Output envs loaded by the dotenv instead of printing a source file content

This commit is contained in:
Alexey Igrychev
2021-03-18 12:13:58 +00:00
parent 4e62aa309e
commit bd74d436c7
7 changed files with 14 additions and 64 deletions
+2 -10
View File
@@ -62,16 +62,8 @@ export class Manager {
const tmpFile = tmp.fileSync()
const tmpFilePath = tmpFile.name
await this.Exec(['ci-env', 'github', '--as-env-file', '-o', tmpFilePath])
dotenv.config({path: tmpFilePath})
fs.readFile(tmpFilePath, null, function(err, contents) {
if (err) {
console.error(err)
} else {
console.log(contents.toString())
}
})
const res = dotenv.config({path: tmpFilePath})
console.log(res.parsed)
tmpFile.removeCallback()
}