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

Commit

Permalink
chore: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed May 21, 2019
1 parent 72fc905 commit a4bffb2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/utils/ipfs-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const expect = chai.expect
chai.use(dirtyChai)
const path = require('path')
const _ = require('lodash')
const yargs = require('yargs')

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

const execute = (exec, args) => {
// Adding '--' at the front of the command allows us to parse commands that
// have a parameter with spaces in it, eg
// ipfs refs --format="<src> -> <dst>"
const cp = exec(yargs('-- ' + args[0]).argv._)
if (args.length === 1) {
args = args[0].split(' ')
}

const cp = exec(args)
const res = cp.then((res) => {
// We can't escape the os.tmpdir warning due to:
// https://github.com/shelljs/shelljs/blob/master/src/tempdir.js#L43
Expand Down

0 comments on commit a4bffb2

Please sign in to comment.