Skip to content

Commit

Permalink
Fix migration tool handling relative paths incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Apr 10, 2020
1 parent 1d96803 commit 34c0215
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/server/bin/ldf-server-migrate-config-3x
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env node
/* Migrates an LDF server config file to the new 3.x.x format. */
const fs = require('fs');
const path = require('path');

let args = process.argv.slice(2);
if (!(args.length === 1 || (args.length === 2 && args[1] === '--apply'))) {
Expand All @@ -19,7 +18,7 @@ function migrateConfig(configFile, updateFile) {
'import': 'preset-qpf:config-defaults.json',
};

const configOld = JSON.parse(fs.readFileSync(path.join(__dirname, configFile)));
const configOld = JSON.parse(fs.readFileSync(configFile));
let config = configOld;

if ('@context' in configOld) {
Expand Down

0 comments on commit 34c0215

Please sign in to comment.