projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
624a022
)
Add log in peertube watch script on error
author
Chocobozzz
<me@florianbigard.com>
Tue, 14 Apr 2020 07:09:11 +0000
(09:09 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 14 Apr 2020 07:09:11 +0000
(09:09 +0200)
server/tools/peertube-watch.ts
patch
|
blob
|
history
diff --git
a/server/tools/peertube-watch.ts
b/server/tools/peertube-watch.ts
index 5f7d1bb07d8edf5efa057baa6f402edd4456ebd9..b8e750a375b216ca8922842048f5ba1674cb7df9 100644
(file)
--- 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)
+ }
}