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

Commit

Permalink
feat: cli: add IPFS_PATH info to init command help (#1274)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Brian Vander Schaaf <bvs330@gmail.com>
  • Loading branch information
bvand authored and daviddias committed Mar 31, 2018
1 parent 4a38690 commit e189b72
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/cli/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,30 @@ const IPFS = require('../../core')
const utils = require('../utils')
const print = utils.print

const ipfsPathHelp = 'ipfs uses a repository in the local file system. By default, the repo is ' +
'located at ~/.ipfs.\nTo change the repo location, set the $IPFS_PATH environment variable:\n\n' +
'\texport IPFS_PATH=/path/to/ipfsrepo\n'

module.exports = {
command: 'init',

describe: 'Initialize a local IPFS node',

builder: {
bits: {
type: 'number',
alias: 'b',
default: '2048',
describe: 'Number of bits to use in the generated RSA private key (defaults to 2048)'
},
emptyRepo: {
alias: 'e',
type: 'boolean',
describe: "Don't add and pin help files to the local storage"
}
builder (yargs) {
print(ipfsPathHelp)

return yargs
.option('bits', {
type: 'number',
alias: 'b',
default: '2048',
describe: 'Number of bits to use in the generated RSA private key (defaults to 2048)'
})
.option('emptyRepo', {
alias: 'e',
type: 'boolean',
describe: "Don't add and pin help files to the local storage"
})
},

handler (argv) {
Expand Down

0 comments on commit e189b72

Please sign in to comment.