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

fix: Add ipfs path to cli help #1302

Merged
merged 1 commit into from
Apr 14, 2018
Merged

Conversation

vasco-santos
Copy link
Member

Aiming to have a consistent menu with go-ipfs, I added the IPFS_PATH as it is presented in Go implementation.

ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:

    export IPFS_PATH=/path/to/ipfsrepo

In PR #1274, it was added to jsipfs init --help, but it was presented before the options description, instead of in the end.

In this solution, I changed the previous implementation. Using yargs epilog, I added the IPFS_PATH message to the epilogue which is displayed for the following cases:

  • jsipfs
  • jsipfs --help
  • jsipfs init --help
  • jsipfs daemon --help

Closes #1213

@vasco-santos vasco-santos requested a review from daviddias April 9, 2018 14:18
@ghost ghost assigned vasco-santos Apr 9, 2018
@ghost ghost added the status/in-progress In progress label Apr 9, 2018
@vasco-santos vasco-santos requested a review from vmx April 9, 2018 14:18
@vasco-santos vasco-santos force-pushed the fix_add-ipfs-path-to-cli-help branch from cd9cc1b to 6bd42e0 Compare April 9, 2018 14:28
src/cli/utils.js Outdated
@@ -111,3 +111,7 @@ exports.rightpad = (val, n) => {
}
return result
}

exports.ipfsPathHelp = 'ipfs uses a repository in the local file system. By default, the repo is ' +
'located at ~/.jsipfs.To change the repo location, set the $IPFS_PATH environment variable:\n\n' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing whitespace between ~/.jsipfs. and To change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed

@vasco-santos vasco-santos force-pushed the fix_add-ipfs-path-to-cli-help branch from 6bd42e0 to af8200d Compare April 9, 2018 14:36
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for shipping this @vasco-santos and thanks for reviewing @vmx ❤️

@daviddias daviddias merged commit 64c3bfb into master Apr 14, 2018
@daviddias daviddias deleted the fix_add-ipfs-path-to-cli-help branch April 14, 2018 11:13
@ghost ghost removed the status/in-progress In progress label Apr 14, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants