mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-24 00:42:18 +00:00
removed dependancy from argv in our test
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { CLI_ERROR, ERROR_CODE } from './Errors';
|
||||
import { CLI_ERROR } from './Errors';
|
||||
import { makeOutDir } from './Utils';
|
||||
import { logger } from './Logger';
|
||||
import { templateElements } from './Types';
|
||||
|
||||
import fs from 'fs';
|
||||
import readlineSync from 'readline-sync';
|
||||
import sanitize from 'sanitize-filename';
|
||||
import yargs from 'yargs';
|
||||
|
||||
@@ -198,14 +197,3 @@ function isOutputTemplateValid(argv: any): boolean {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
export function promptUser(choices: Array<string>): number {
|
||||
const index: number = readlineSync.keyInSelect(choices, 'Which resolution/format do you prefer?');
|
||||
|
||||
if (index === -1) {
|
||||
process.exit(ERROR_CODE.CANCELLED_USER_INPUT);
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user