X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-upload.ts;h=114fe8a290da599583d91fdb760b1e32d378a7b8;hb=c5b28f63367ac373bfa38d4b21791a0a5f1d78c1;hp=01fb1fe8d5e3e76151f91ed62426d94a029d0eb6;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts index 01fb1fe8d..114fe8a29 100644 --- a/server/tools/peertube-upload.ts +++ b/server/tools/peertube-upload.ts @@ -1,6 +1,3 @@ -import { registerTSPaths } from '../helpers/register-ts-paths' -registerTSPaths() - import { program } from 'commander' import { access, constants } from 'fs-extra' import { isAbsolute } from 'path' @@ -66,7 +63,13 @@ async function run (url: string, username: string, password: string) { console.log(`Video ${options.videoName} uploaded.`) process.exit(0) } catch (err) { - console.error(require('util').inspect(err)) + const message = err.message || '' + if (message.includes('413')) { + console.error('Aborted: user quota is exceeded or video file is too big for this PeerTube instance.') + } else { + console.error(require('util').inspect(err)) + } + process.exit(-1) } }