From: Chocobozzz Date: Tue, 14 Apr 2020 07:09:11 +0000 (+0200) Subject: Add log in peertube watch script on error X-Git-Tag: v2.2.0-rc.1~234 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a38878191646ee923e8d6c41beb167edffffb781;p=oweals%2Fpeertube.git Add log in peertube watch script on error --- 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) + } }