Add .exe on windows (#83)

This commit is contained in:
kekxv 2025-05-27 23:07:41 +08:00 committed by GitHub
parent 14421f585a
commit f26390261c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 204 additions and 14 deletions

View file

@ -96,7 +96,11 @@ async function downloadBazelisk() {
core.debug('Adding to the cache...');
fs.chmodSync(downloadPath, '755');
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
let bazel_name = "bazel";
if (platform == 'windows') {
bazel_name = `${bazel_name}.exe`
}
const cachePath = await tc.cacheFile(downloadPath, bazel_name, 'bazelisk', version)
core.debug(`Successfully cached bazelisk to ${cachePath}`)
return cachePath