mirror of
https://github.com/werf/actions.git
synced 2026-02-05 02:46:23 +03:00
Merge pull request #29 from werf/output_dotenv_instead_of_catting_source_file
Output envs loaded by the dotenv instead of printing a source file content
This commit is contained in:
@@ -43843,15 +43843,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43843,15 +43843,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43844,15 +43844,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43844,15 +43844,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43962,15 +43962,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
11
run/index.js
11
run/index.js
@@ -43916,15 +43916,8 @@ class Manager {
|
||||
const tmpFile = tmp.fileSync();
|
||||
const tmpFilePath = tmpFile.name;
|
||||
yield 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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user