Skip to content

Commit

Permalink
fix: default to open and copy to clipboard
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
agentofuser committed Jun 8, 2019
1 parent 53af0da commit 73a9b9d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/ipfs-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const parser = yargs
.options({
C: {
alias: 'no-clipboard',
type: 'boolean',
describe: "DON'T copy ipfs.io/ipfs/<hash> to clipboard",
},
d: {
Expand All @@ -38,7 +37,6 @@ const parser = yargs
},
O: {
alias: 'no-open',
type: 'boolean',
describe: "DON'T open URL after deploying",
},
p: {
Expand Down Expand Up @@ -93,8 +91,9 @@ async function main() {

const deployOptions = {
publicDirPath: argv.path,
copyHttpGatewayUrlToClipboard: argv.clipboard,
open: argv.open,
copyHttpGatewayUrlToClipboard:
!(argv.clipboard === false) && !argv.C && !argv.noClipboard,
open: !(argv.open === false) && !argv.O && !argv.noOpen,
remotePinners: argv.pinner,
dnsProviders: argv.dns,
siteDomain: argv.siteDomain,
Expand Down

0 comments on commit 73a9b9d

Please sign in to comment.