Clean set-variables-in-env.js

This commit is contained in:
ziajka 2019-01-25 13:49:34 +01:00
parent 7e6f64b16a
commit 4ea8c9568f

View File

@ -1,14 +1,11 @@
const yargs = require('yargs'); const yargs = require('yargs');
// const tmp = require('tmp');
const fs = require('fs'); const fs = require('fs');
const path = require('path');
const argv = yargs.argv; const argv = yargs.argv;
const tempFile = `.temp-var-file.ts`; const tempFile = `.temp-var-file.ts`;
if(argv.set) { if(argv.set) {
const envFile = argv.set; const envFile = argv.set;
console.log(`Backuping up '${envFile}' into '${tempFile}'.`); console.log(`Backuping up '${envFile}' into '${tempFile}'.`);
fs.copyFileSync(envFile, tempFile); fs.copyFileSync(envFile, tempFile);
const content = fs.readFileSync(envFile, "utf8"); const content = fs.readFileSync(envFile, "utf8");