diff --git a/lib/commands/backup.js b/lib/commands/backup.js index ffcf3a945..8e5d60ef1 100644 --- a/lib/commands/backup.js +++ b/lib/commands/backup.js @@ -23,11 +23,13 @@ class BackupCommand extends Command { } // Get the latest version in our current major - const {latestMajor} = await loadVersions(); + const {latestMajor, latest} = await loadVersions(); const activeMajor = semver.major(instance.version); const latestMinor = latestMajor[`v${activeMajor}`]; - if (instance.version !== latestMinor && !argv.force) { + const isBehindByMajor = semver.diff(instance.version, latest) === 'major'; + + if (instance.version !== latestMinor && isBehindByMajor && !argv.force) { const currentMajor = semver.major(instance.version); throw new CliError({