Skip to content

Commit 021f301

Browse files
committed
fixing --no-* flags
1 parent 68431d9 commit 021f301

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

bin/ldnode.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ var argv = require('nomnom')
5959
.option('noLive', {
6060
full: 'no-live',
6161
help: 'Disable live support through WebSockets',
62-
abbr: 's'
62+
abbr: 's',
63+
flag: true
6364
})
6465
.parse();
6566

@@ -68,19 +69,9 @@ if (argv.version) {
6869
return;
6970
}
7071

71-
// Set up webid
72-
if (argv.noWebid) {
73-
argv.webid = {key: argv.webidKey, cert: argv.webidCert}
74-
} else {
75-
argv.webid = false;
76-
}
77-
78-
// Set up ssl
79-
if (argv.noSsl) {
80-
argv.ssl = {key: argv.sslKey, cert: argv.sslCert}
81-
} else {
82-
argv.ssl = false;
83-
}
72+
// Set up --no-*
73+
argv.webid = !argv.noWebid;
74+
argv.live = !argv.noLive;
8475

8576
// Set up debug environment
8677
process.env.DEBUG = argv.verbose ? 'ldnode:*' : false;

0 commit comments

Comments
 (0)