From b82ce39d3508b6ea7b33eab084e2525bbb400d4e Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Thu, 21 Mar 2019 21:08:02 +0000 Subject: [PATCH] fix: name resolve arg parsing Boolean args were not being parsed as booleans. License: MIT Signed-off-by: Alan Shaw --- src/cli/commands/daemon.js | 1 + src/cli/commands/name/resolve.js | 4 +++- test/cli/name.js | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cli/commands/daemon.js b/src/cli/commands/daemon.js index 8e254164bb..4f4b87e980 100644 --- a/src/cli/commands/daemon.js +++ b/src/cli/commands/daemon.js @@ -20,6 +20,7 @@ module.exports = { default: false }) .option('offline', { + type: 'boolean', desc: 'Run offline. Do not connect to the rest of the network but provide local API.', default: false }) diff --git a/src/cli/commands/name/resolve.js b/src/cli/commands/name/resolve.js index 9c72a2bc0c..e8871a1d17 100644 --- a/src/cli/commands/name/resolve.js +++ b/src/cli/commands/name/resolve.js @@ -9,13 +9,15 @@ module.exports = { builder: { nocache: { + type: 'boolean', alias: 'n', describe: 'Do not use cached entries. Default: false.', default: false }, recursive: { + type: 'boolean', alias: 'r', - recursive: 'Resolve until the result is not an IPNS name. Default: false.', + describe: 'Resolve until the result is not an IPNS name. Default: false.', default: false } }, diff --git a/test/cli/name.js b/test/cli/name.js index 95601de28e..c34ae70ef4 100644 --- a/test/cli/name.js +++ b/test/cli/name.js @@ -158,8 +158,7 @@ describe('name', () => { }) }) - // FIXME: currently failing, resolve before 0.35 release! - it.skip('should go recursively until finding an ipfs hash', function () { + it('should go recursively until finding an ipfs hash', function () { this.timeout(90 * 1000) return ipfs(`name publish ${cidAdded}`)