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

Commit 2bf49ea

Browse files
victorbdaviddias
authored andcommitted
fix(cli): use right argument for cli .cat
Add tests for making sure .cat shows right output and fix that test by using the right argument from cli. Ref: issue #476
1 parent 76959ac commit 2bf49ea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cli/commands/files/cat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
builder: {},
1414

1515
handler (argv) {
16-
const path = argv.ipfsPath
16+
const path = argv['ipfs-path']
1717
utils.getIPFS((err, ipfs) => {
1818
if (err) {
1919
throw err

test/cli/test-files.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ describe('files', () => {
1717
.run((err, stdout, exitcode) => {
1818
expect(err).to.not.exist
1919
expect(exitcode).to.equal(0)
20+
expect(stdout[0]).to.equal('hello world')
2021
done()
2122
})
2223
})

0 commit comments

Comments
 (0)