Skip to content

Commit 73a9b9d

Browse files
committed
fix: default to open and copy to clipboard
This was already the default but the previous commit fixed the explictly negative case and messed up the default, no options passed, case. Yargs is weird.
1 parent 53af0da commit 73a9b9d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bin/ipfs-deploy.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const parser = yargs
2828
.options({
2929
C: {
3030
alias: 'no-clipboard',
31-
type: 'boolean',
3231
describe: "DON'T copy ipfs.io/ipfs/<hash> to clipboard",
3332
},
3433
d: {
@@ -38,7 +37,6 @@ const parser = yargs
3837
},
3938
O: {
4039
alias: 'no-open',
41-
type: 'boolean',
4240
describe: "DON'T open URL after deploying",
4341
},
4442
p: {
@@ -93,8 +91,9 @@ async function main() {
9391

9492
const deployOptions = {
9593
publicDirPath: argv.path,
96-
copyHttpGatewayUrlToClipboard: argv.clipboard,
97-
open: argv.open,
94+
copyHttpGatewayUrlToClipboard:
95+
!(argv.clipboard === false) && !argv.C && !argv.noClipboard,
96+
open: !(argv.open === false) && !argv.O && !argv.noOpen,
9897
remotePinners: argv.pinner,
9998
dnsProviders: argv.dns,
10099
siteDomain: argv.siteDomain,

0 commit comments

Comments
 (0)