Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 4ab9c4d

Browse files
AuHaudirkmc
andauthored
Messages tweak
Co-Authored-By: dirkmc <[email protected]>
1 parent 405d259 commit 4ab9c4d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/commands.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async function migrate ({ repoPath, migrations, to, dry, revertOk }) {
6262
} else if (revertOk) {
6363
await migrator.revert(repoPath, to, options)
6464
} else {
65-
throw new Error('The migration would require reversion of the repo, but you have not allowed it as \'--revert-ok\' is not present.')
65+
throw new Error(`The migration would revert the repo version from ${version} to ${to}. To revert you must supply '--revert-ok'.`)
6666
}
6767
}
6868

@@ -77,9 +77,9 @@ async function status ({ repoPath, migrations }) {
7777
const version = await repoVersion.getVersion(repoPath)
7878
const lastMigrationVersion = migrator.getLatestMigrationVersion(migrations)
7979
const statusString =
80-
version < lastMigrationVersion ? chalk.yellow('There are migrations to be applied!') : chalk.green('Nothing to migrate!')
80+
version < lastMigrationVersion ? chalk.yellow('Repo is out of date') : chalk.green('Nothing to migrate')
8181

82-
return `${statusString}\nCurrent repo version: ${version}\nLast migration's version: ${lastMigrationVersion}`
82+
return `${statusString}\nCurrent repo version: ${version}\nLatest migration version: ${lastMigrationVersion}`
8383
}
8484

8585
async function getAuthor () {
@@ -127,21 +127,21 @@ module.exports = {
127127
handler: asyncClosure(migrate),
128128
builder: yargv => yargv
129129
.option('to', {
130-
describe: 'Specify to which version should be repo migrated to',
130+
describe: 'Target version to migrate repo to',
131131
type: 'number'
132132
})
133133
.option('dry', {
134-
describe: 'Only displays what migrations will be reverted',
134+
describe: `Output migration results but don't actually perform migration`,
135135
type: 'boolean'
136136
})
137137
.option('revert-ok', {
138-
describe: 'Allows to do backward migration, if the specific version is lower the current version of repository',
138+
describe: 'Allow migrating to a lower version (reverting)',
139139
type: 'boolean'
140140
})
141141
},
142142
status: {
143143
command: 'status',
144-
describe: 'Display status of IPFS repo',
144+
describe: 'Display migration status of IPFS repo',
145145
handler: asyncClosure(status)
146146
},
147147
add: {

0 commit comments

Comments
 (0)