From 05d6633c2ded2f5e925fb58e6f1ecdcfddfd1bf2 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 30 Oct 2020 17:43:31 +0100 Subject: [PATCH] Rebuild Signed-off-by: Johannes Schindelin --- dist/index.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9683c1140..df758983b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3311,11 +3311,15 @@ function cleanup() { } // Main if (!stateHelper.IsPost) { - run(); + run().catch(error => { + core.setFailed(error.message); + }); } // Post else { - cleanup(); + cleanup().catch(error => { + core.setFailed(error.message); + }); } @@ -5496,10 +5500,10 @@ class GitAuthHelper { const output = yield this.git.submoduleForeach(`git config --local '${this.tokenConfigKey}' '${this.tokenPlaceholderConfigValue}' && git config --local --show-origin --name-only --get-regexp remote.origin.url`, this.settings.nestedSubmodules); // Replace the placeholder const configPaths = output.match(/(?<=(^|\n)file:)[^\t]+(?=\tremote\.origin\.url)/g) || []; - for (const configPath of configPaths) { + yield Promise.all(configPaths.map((configPath) => __awaiter(this, void 0, void 0, function* () { core.debug(`Replacing token placeholder in '${configPath}'`); - this.replaceTokenPlaceholder(configPath); - } + yield this.replaceTokenPlaceholder(configPath); + }))); if (this.settings.sshKey) { // Configure core.sshCommand yield this.git.submoduleForeach(`git config --local '${SSH_COMMAND_KEY}' '${this.sshCommand}'`, this.settings.nestedSubmodules); @@ -9594,7 +9598,7 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath) else { yield toolCache.extractTar(archivePath, extractPath); } - io.rmRF(archivePath); + yield io.rmRF(archivePath); // Determine the path of the repository content. The archive contains // a top-level folder and the repository content is inside. const archiveFileNames = yield fs.promises.readdir(extractPath); @@ -9613,7 +9617,7 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath) yield io.mv(sourcePath, targetPath); } } - io.rmRF(extractPath); + yield io.rmRF(extractPath); }); } exports.downloadRepository = downloadRepository;