diff --git a/scripts/commands/channels/edit.ts b/scripts/commands/channels/edit.ts index 5d3b2645..7cd35569 100644 --- a/scripts/commands/channels/edit.ts +++ b/scripts/commands/channels/edit.ts @@ -8,7 +8,6 @@ import { Channel } from '../../models' import nodeCleanup from 'node-cleanup' import * as sdk from '@iptv-org/sdk' import { Command } from 'commander' -import readline from 'readline' interface ChoiceValue { type: string @@ -21,17 +20,6 @@ interface Choice { default?: boolean } -if (process.platform === 'win32') { - readline - .createInterface({ - input: process.stdin, - output: process.stdout - }) - .on('SIGINT', function () { - process.emit('SIGINT') - }) -} - const program = new Command() program.argument('', 'Path to *.channels.xml file to edit').parse(process.argv) @@ -44,6 +32,7 @@ let channelsFromXML = new Collection() main(filepath) nodeCleanup(() => { save(filepath, channelsFromXML) + if (process.platform === 'win32') process.kill(0) }) export default async function main(filepath: string) {