]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/peertube.ts
Fix some defaults values + indentation
[github/Chocobozzz/PeerTube.git] / server / tools / peertube.ts
index 7441161b1506d58763315c8d75a092c7cd216cde..ad76bafb4063411070d2974282d5cb48aa0ed61f 100755 (executable)
@@ -7,7 +7,7 @@ import {
 } from './cli'
 
 program
-  .version(version(), '-v, --version')
+  .version(version, '-v, --version')
   .usage('[command] [options]')
 
 /* Subcommands automatically loaded in the directory and beginning by peertube-* */
@@ -62,7 +62,7 @@ if (!process.argv.slice(2).length) {
 
 getSettings()
   .then(settings => {
-    const state = (settings.default === -1) ?
+    const state = (settings.default === undefined || settings.default === -1) ?
       'no instance selected, commands will require explicit arguments' :
       ('instance ' + settings.remotes[settings.default] + ' selected')
     program