Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 30, 2020
1 parent 678b6f8 commit 05d6633
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions dist/index.js
Expand Up @@ -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);
});
}


Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 05d6633

Please sign in to comment.