diff --git a/lib/migrate.js b/lib/migrate.js index 4bd5fa57..9802eade 100644 --- a/lib/migrate.js +++ b/lib/migrate.js @@ -14,7 +14,9 @@ const exists = async path => { export const maybeMigrateRuntimeState = async () => { const newRuntimeStatePath = paths.runtimeState const oldRuntimeStatePath = join(getOldStateRoot(), 'modules') - if (!(await exists(newRuntimeStatePath)) && await exists(oldRuntimeStatePath)) { + const hasNewState = await exists(newRuntimeStatePath) + const hasOldState = await exists(oldRuntimeStatePath) + if (!hasNewState && hasOldState) { console.error( `Migrating runtime state files from ${oldRuntimeStatePath} to ${newRuntimeStatePath}` )