From 1aac108356d51e8d00cbfd31e01dd1d5e30f6de9 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sat, 3 Aug 2019 16:17:10 -0500 Subject: [PATCH] Update build script We now use `chdir` instead of `path.resolve` to get file-relative paths. --- build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build b/build index d04b38785..bc79584ba 100755 --- a/build +++ b/build @@ -7,7 +7,8 @@ if (!require('assert').strict) { var execSync = require('child_process').execSync; var fs = require('fs'); -var path = require('path'); + +process.chdir(__dirname); try { require.resolve('@babel/core'); @@ -23,8 +24,8 @@ try { console.log('config.js does not exist. Creating one with default settings...'); fs.writeFileSync( - path.resolve(__dirname, 'config/config.js'), - fs.readFileSync(path.resolve(__dirname, 'config/config-example.js')) + 'config/config.js', + fs.readFileSync('config/config-example.js') ); }