diff options
Diffstat (limited to 'server/tools/peertube-watch.ts')
-rw-r--r-- | server/tools/peertube-watch.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tools/peertube-watch.ts b/server/tools/peertube-watch.ts index 3ca3e242a..892c9e7a6 100644 --- a/server/tools/peertube-watch.ts +++ b/server/tools/peertube-watch.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { registerTSPaths } from '../helpers/register-ts-paths' | 1 | import { registerTSPaths } from '../helpers/register-ts-paths' |
2 | registerTSPaths() | 2 | registerTSPaths() |
3 | 3 | ||
4 | import * as program from 'commander' | 4 | import { program, Option, OptionValues } from 'commander' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { execSync } from 'child_process' | 6 | import { execSync } from 'child_process' |
7 | 7 | ||
@@ -9,7 +9,7 @@ program | |||
9 | .name('watch') | 9 | .name('watch') |
10 | .arguments('<url>') | 10 | .arguments('<url>') |
11 | .addOption( | 11 | .addOption( |
12 | new program.Option('-g, --gui <player>', 'player type') | 12 | new Option('-g, --gui <player>', 'player type') |
13 | .default('vlc') | 13 | .default('vlc') |
14 | .choices([ 'airplay', 'stdout', 'chromecast', 'mpv', 'vlc', 'mplayer', 'xbmc' ]) | 14 | .choices([ 'airplay', 'stdout', 'chromecast', 'mpv', 'vlc', 'mplayer', 'xbmc' ]) |
15 | ) | 15 | ) |
@@ -22,7 +22,7 @@ program | |||
22 | .action((url, options) => run(url, options)) | 22 | .action((url, options) => run(url, options)) |
23 | .parse(process.argv) | 23 | .parse(process.argv) |
24 | 24 | ||
25 | function run (url: string, options: program.OptionValues) { | 25 | function run (url: string, options: OptionValues) { |
26 | if (!url) { | 26 | if (!url) { |
27 | console.error('<url> positional argument is required.') | 27 | console.error('<url> positional argument is required.') |
28 | process.exit(-1) | 28 | process.exit(-1) |