X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-watch.ts;h=5f7d1bb07d8edf5efa057baa6f402edd4456ebd9;hb=b6e0e6a31bdef7c0faebca96864eb334dd9e7ad7;hp=7c27c13642c5ab4880812637b332f3059dec2230;hpb=46b2cec73c3ee10fe9f751a301e4afff0a56b371;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-watch.ts b/server/tools/peertube-watch.ts index 7c27c1364..5f7d1bb07 100644 --- a/server/tools/peertube-watch.ts +++ b/server/tools/peertube-watch.ts @@ -1,3 +1,6 @@ +import { registerTSPaths } from '../helpers/register-ts-paths' +registerTSPaths() + import * as program from 'commander' import { join } from 'path' import { execSync } from 'child_process' @@ -26,16 +29,10 @@ program console.log(' $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10') console.log() }) - .action((url, cmd) => { - run(url, cmd) - .catch(err => { - console.error(err) - process.exit(-1) - }) - }) + .action((url, cmd) => run(url, cmd)) .parse(process.argv) -async function run (url: string, program: any) { +function run (url: string, program: any) { if (!url) { console.error(' positional argument is required.') process.exit(-1)