@@ -18339,7 +18339,7 @@ var require_summary = __commonJS({
1833918339 exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
1834018340 var os_1 = __require("os");
1834118341 var fs_1 = __require("fs");
18342- var { access, appendFile, writeFile } = fs_1.promises;
18342+ var { access, appendFile: appendFile2 , writeFile } = fs_1.promises;
1834318343 exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY";
1834418344 exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";
1834518345 var Summary = class {
@@ -18375,7 +18375,7 @@ var require_summary = __commonJS({
1837518375 return __awaiter(this, void 0, void 0, function* () {
1837618376 const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
1837718377 const filePath = yield this.filePath();
18378- const writeFunc = overwrite ? writeFile : appendFile ;
18378+ const writeFunc = overwrite ? writeFile : appendFile2 ;
1837918379 yield writeFunc(filePath, this._buffer, { encoding: "utf8" });
1838018380 return this.emptyBuffer();
1838118381 });
@@ -55959,6 +55959,8 @@ ${stderr}`);
5595955959}
5596055960
5596155961//
55962+ import { appendFile } from "fs/promises";
55963+ import { stripVTControlCharacters } from "util";
5596255964var LogLevel;
5596355965(function(LogLevel2) {
5596455966 LogLevel2[LogLevel2["SILENT"] = 0] = "SILENT";
@@ -56004,7 +56006,7 @@ function runConsoleCommand(loadCommand, logLevel, ...text) {
5600456006 if (getLogLevel() >= logLevel) {
5600556007 loadCommand()(...text);
5600656008 }
56007- printToLogFile (logLevel, ...text);
56009+ appendToLogFile (logLevel, ...text);
5600856010}
5600956011function getLogLevel() {
5601056012 const logLevel = Object.keys(LogLevel).indexOf((process.env[`LOG_LEVEL`] || "").toUpperCase());
@@ -56013,12 +56015,22 @@ function getLogLevel() {
5601356015 }
5601456016 return logLevel;
5601556017}
56016- var LOGGED_TEXT = "";
5601756018var LOG_LEVEL_COLUMNS = 7;
56018- function printToLogFile(logLevel, ...text) {
56019+ var logFilePath = void 0;
56020+ function appendToLogFile(logLevel, ...text) {
56021+ if (logFilePath === void 0) {
56022+ return;
56023+ }
56024+ if (logLevel === void 0) {
56025+ appendFile(logFilePath, text.join(" "));
56026+ return;
56027+ }
5601956028 const logLevelText = `${LogLevel[logLevel]}:`.padEnd(LOG_LEVEL_COLUMNS);
56020- LOGGED_TEXT += text.join(" ").split("\n").map((l) => `${logLevelText} ${l}
56021- `).join("");
56029+ appendFile(
56030+ logFilePath,
56031+ stripVTControlCharacters(text.join(" ").split("\n").map((l) => `${logLevelText} ${l}
56032+ `).join(""))
56033+ );
5602256034}
5602356035
5602456036//
0 commit comments