diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-25 17:48:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-25 17:48:27 +0200 |
commit | 12152aa09ff47dc5c5a627c27030855e254e58ad (patch) | |
tree | 3b630bce33bd62a21da4a10c3ac62189eabcb8a6 /server/tools/peertube-watch.ts | |
parent | 8cc6120118a9fb75b3165c9f84b2d0068d1ade72 (diff) | |
download | PeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.tar.gz PeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.tar.zst PeerTube-12152aa09ff47dc5c5a627c27030855e254e58ad.zip |
Update tools dependencies
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) |