X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube.ts;h=a40c1332e9158f29a375e293af3bea67e023cdb1;hb=b0c43e36dbdc2c964f6828a78b146faebfb75b21;hp=88dd5f7f6ced53d831a2c7cd912fbabd3fe04ba4;hpb=c2777c1dfe688c8fab1ef2fed50e360100fa9198;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube.ts b/server/tools/peertube.ts index 88dd5f7f6..a40c1332e 100644 --- a/server/tools/peertube.ts +++ b/server/tools/peertube.ts @@ -5,7 +5,7 @@ import { registerTSPaths } from '../helpers/register-ts-paths' registerTSPaths() -import * as program from 'commander' +import { CommandOptions, program } from 'commander' import { getSettings, version } from './cli' program @@ -28,11 +28,11 @@ program .command( 'diagnostic [action]', 'like couple therapy, but for your instance', - { noHelp: true } as program.CommandOptions + { noHelp: true } as CommandOptions ).alias('d') .command('admin', 'manage an instance where you have elevated rights', - { noHelp: true } as program.CommandOptions + { noHelp: true } as CommandOptions ).alias('a') // help on no command @@ -69,17 +69,12 @@ getSettings() : 'instance ' + settings.remotes[settings.default] + ' selected' program - .on('--help', function () { - console.log() - console.log(' State: ' + state) - console.log() - console.log(' Examples:') - console.log() - console.log(' $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"') - console.log(' $ peertube up ') - console.log(' $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10') - console.log() - }) + .addHelpText('after', '\n\n State: ' + state + '\n\n' + + ' Examples:\n\n' + + ' $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"\n' + + ' $ peertube up \n' + + ' $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10\n' + ) .parse(process.argv) }) .catch(err => console.error(err))