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

cli: add IPFS_PATH info to init command help #1274

Merged
merged 1 commit into from
Mar 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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