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

Commit 78b64e6

Browse files
committed
feat(cli): --migrate support
1 parent ad79804 commit 78b64e6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/cli/parser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ const parser = yargs
1919
type: 'string',
2020
default: ''
2121
})
22+
.option('migrate', {
23+
desc: 'Allows automatic migrations',
24+
type: 'boolean',
25+
default: false
26+
})
2227
.epilog(utils.ipfsPathHelp)
2328
.demandCommand(1)
2429
.fail((msg, err, yargs) => {

src/cli/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ exports.getIPFS = (argv, callback) => {
4747
const IPFS = require('../core')
4848
const node = new IPFS({
4949
silent: argv.silent,
50+
repoAutoMigrate: argv.migrate,
5051
repo: exports.getRepoPath(),
5152
init: false,
5253
start: false,

0 commit comments

Comments
 (0)