aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-watch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/peertube-watch.ts')
-rw-r--r--server/tools/peertube-watch.ts6
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 @@
1import { registerTSPaths } from '../helpers/register-ts-paths' 1import { registerTSPaths } from '../helpers/register-ts-paths'
2registerTSPaths() 2registerTSPaths()
3 3
4import * as program from 'commander' 4import { program, Option, OptionValues } from 'commander'
5import { join } from 'path' 5import { join } from 'path'
6import { execSync } from 'child_process' 6import { 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
25function run (url: string, options: program.OptionValues) { 25function 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)