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

Commit b55cfde

Browse files
committed
fix: restore param parsing behaviour
1 parent 07e4267 commit b55cfde

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/utils/ipfs-exec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const expect = chai.expect
77
chai.use(dirtyChai)
88

99
const _ = require('lodash')
10-
const yargs = require('yargs')
1110

1211
// This is our new test utility to easily check and execute ipfs cli commands.
1312
//
@@ -35,10 +34,11 @@ module.exports = (repoPath, opts) => {
3534
}))
3635

3736
const execute = (exec, args) => {
38-
// Adding '--' at the front of the command allows us to parse commands that
39-
// have a parameter with spaces in it, eg
40-
// ipfs refs --format="<src> -> <dst>"
41-
const cp = exec(yargs('-- ' + args[0]).argv._)
37+
if (args.length === 1) {
38+
args = args[0].split(' ')
39+
}
40+
41+
const cp = exec(args)
4242
const res = cp.then((res) => {
4343
// We can't escape the os.tmpdir warning due to:
4444
// https://github.com/shelljs/shelljs/blob/master/src/tempdir.js#L43

0 commit comments

Comments
 (0)