From a38878191646ee923e8d6c41beb167edffffb781 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Apr 2020 09:09:11 +0200 Subject: Add log in peertube watch script on error --- server/tools/peertube-watch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) { url.replace('videos/watch', 'download/torrents') + `-${program.resolution}.torrent` - execSync(cmd + args) + try { + execSync(cmd + args) + } catch (err) { + console.error('Cannto exec command.', err) + process.exit(-1) + } } -- cgit v1.2.3