Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: ipns publish resolve option overwritten (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored and alanshaw committed Sep 11, 2018
1 parent dd977a5 commit ef7d2c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/cli/commands/name/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {

builder: {
resolve: {
alias: 'r',
describe: 'Resolve given path before publishing. Default: true.',
default: true
},
Expand All @@ -29,8 +30,16 @@ module.exports = {
},

handler (argv) {
// yargs-promise adds resolve/reject properties to argv
// resolve should use the alias as resolve will always be overwritten to a function
let resolve = true

if (argv.r === false || argv.r === 'false') {
resolve = false
}

const opts = {
resolve: argv.resolve,
resolve,
lifetime: argv.lifetime,
key: argv.key,
ttl: argv.ttl
Expand Down

0 comments on commit ef7d2c8

Please sign in to comment.