diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-14 09:09:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-14 09:09:11 +0200 |
commit | a38878191646ee923e8d6c41beb167edffffb781 (patch) | |
tree | 051a0402aab7a7bc8390d83ee090c7ff815b6b94 /server/tools/peertube-watch.ts | |
parent | 624a022157abc74e72c2cac3a80c823eb950e599 (diff) | |
download | PeerTube-a38878191646ee923e8d6c41beb167edffffb781.tar.gz PeerTube-a38878191646ee923e8d6c41beb167edffffb781.tar.zst PeerTube-a38878191646ee923e8d6c41beb167edffffb781.zip |
Add log in peertube watch script on error
Diffstat (limited to 'server/tools/peertube-watch.ts')
-rw-r--r-- | server/tools/peertube-watch.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tools/peertube-watch.ts b/server/tools/peertube-watch.ts index 5f7d1bb07..b8e750a37 100644 --- a/server/tools/peertube-watch.ts +++ b/server/tools/peertube-watch.ts | |||
@@ -43,5 +43,10 @@ function run (url: string, program: any) { | |||
43 | url.replace('videos/watch', 'download/torrents') + | 43 | url.replace('videos/watch', 'download/torrents') + |
44 | `-${program.resolution}.torrent` | 44 | `-${program.resolution}.torrent` |
45 | 45 | ||
46 | execSync(cmd + args) | 46 | try { |
47 | execSync(cmd + args) | ||
48 | } catch (err) { | ||
49 | console.error('Cannto exec command.', err) | ||
50 | process.exit(-1) | ||
51 | } | ||
47 | } | 52 | } |