Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing awaits #379

Merged
merged 4 commits into from Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Expand Up @@ -27,6 +27,7 @@
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
dscho marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Expand Up @@ -5498,7 +5498,7 @@ class GitAuthHelper {
const configPaths = output.match(/(?<=(^|\n)file:)[^\t]+(?=\tremote\.origin\.url)/g) || [];
for (const configPath of configPaths) {
core.debug(`Replacing token placeholder in '${configPath}'`);
this.replaceTokenPlaceholder(configPath);
yield this.replaceTokenPlaceholder(configPath);
}
if (this.settings.sshKey) {
// Configure core.sshCommand
Expand Down Expand Up @@ -9594,7 +9594,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 +9613,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
2 changes: 1 addition & 1 deletion src/git-auth-helper.ts
Expand Up @@ -148,7 +148,7 @@ class GitAuthHelper {
output.match(/(?<=(^|\n)file:)[^\t]+(?=\tremote\.origin\.url)/g) || []
for (const configPath of configPaths) {
core.debug(`Replacing token placeholder in '${configPath}'`)
this.replaceTokenPlaceholder(configPath)
await this.replaceTokenPlaceholder(configPath)
}

if (this.settings.sshKey) {
Expand Down
4 changes: 2 additions & 2 deletions src/github-api-helper.ts
Expand Up @@ -47,7 +47,7 @@ export async function downloadRepository(
} else {
await toolCache.extractTar(archivePath, extractPath)
}
io.rmRF(archivePath)
await io.rmRF(archivePath)

// Determine the path of the repository content. The archive contains
// a top-level folder and the repository content is inside.
Expand All @@ -70,7 +70,7 @@ export async function downloadRepository(
await io.mv(sourcePath, targetPath)
}
}
io.rmRF(extractPath)
await io.rmRF(extractPath)
}

/**
Expand Down