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

Commit e189b72

Browse files
bvanddaviddias
authored andcommitted
feat: cli: add IPFS_PATH info to init command help (#1274)
License: MIT Signed-off-by: Brian Vander Schaaf <[email protected]>
1 parent 4a38690 commit e189b72

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

src/cli/commands/init.js

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,30 @@ const IPFS = require('../../core')
55
const utils = require('../utils')
66
const print = utils.print
77

8+
const ipfsPathHelp = 'ipfs uses a repository in the local file system. By default, the repo is ' +
9+
'located at ~/.ipfs.\nTo change the repo location, set the $IPFS_PATH environment variable:\n\n' +
10+
'\texport IPFS_PATH=/path/to/ipfsrepo\n'
11+
812
module.exports = {
913
command: 'init',
1014

1115
describe: 'Initialize a local IPFS node',
1216

13-
builder: {
14-
bits: {
15-
type: 'number',
16-
alias: 'b',
17-
default: '2048',
18-
describe: 'Number of bits to use in the generated RSA private key (defaults to 2048)'
19-
},
20-
emptyRepo: {
21-
alias: 'e',
22-
type: 'boolean',
23-
describe: "Don't add and pin help files to the local storage"
24-
}
17+
builder (yargs) {
18+
print(ipfsPathHelp)
19+
20+
return yargs
21+
.option('bits', {
22+
type: 'number',
23+
alias: 'b',
24+
default: '2048',
25+
describe: 'Number of bits to use in the generated RSA private key (defaults to 2048)'
26+
})
27+
.option('emptyRepo', {
28+
alias: 'e',
29+
type: 'boolean',
30+
describe: "Don't add and pin help files to the local storage"
31+
})
2532
},
2633

2734
handler (argv) {

0 commit comments

Comments
 (0)