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

Commit ef7d2c8

Browse files
vasco-santosalanshaw
authored andcommitted
fix: ipns publish resolve option overwritten (#1556)
1 parent dd977a5 commit ef7d2c8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cli/commands/name/publish.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99

1010
builder: {
1111
resolve: {
12+
alias: 'r',
1213
describe: 'Resolve given path before publishing. Default: true.',
1314
default: true
1415
},
@@ -29,8 +30,16 @@ module.exports = {
2930
},
3031

3132
handler (argv) {
33+
// yargs-promise adds resolve/reject properties to argv
34+
// resolve should use the alias as resolve will always be overwritten to a function
35+
let resolve = true
36+
37+
if (argv.r === false || argv.r === 'false') {
38+
resolve = false
39+
}
40+
3241
const opts = {
33-
resolve: argv.resolve,
42+
resolve,
3443
lifetime: argv.lifetime,
3544
key: argv.key,
3645
ttl: argv.ttl

0 commit comments

Comments
 (0)