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

Commit

Permalink
Merge pull request #80 from LiskHQ/bugfix-update-config-script-1.0.0
Browse files Browse the repository at this point in the history
Bugfix update config script for 1.0.0
  • Loading branch information
shuse2 authored Sep 1, 2018
2 parents 77e0878 + 5fa9fa3 commit 7afe5e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/update_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ console.info('Starting configuration migration...');
const oldConfig = JSON.parse(fs.readFileSync(oldConfigPath, 'utf8'));
const newConfig = JSON.parse(fs.readFileSync(newConfigPath, 'utf8'));

// Values to keep from new config file
delete oldConfig.version;
delete oldConfig.minVersion;

// 1.0.1 and 1.0.2 doesn't add any changes to 1.0.0 config.json
if (oldConfig.version === '1.0.0' || oldConfig.version === '1.0.1') {
copyTheConfigFile();
Expand Down Expand Up @@ -165,6 +161,10 @@ function migrateSecrets(password) {
}

function copyTheConfigFile() {
// Values to keep from new config file
delete oldConfig.version;
delete oldConfig.minVersion;

const modifiedConfig = extend(true, {}, newConfig, oldConfig);

try {
Expand Down

0 comments on commit 7afe5e8

Please sign in to comment.