mirror of
https://github.com/actions/setup-java.git
synced 2025-06-28 20:14:14 +00:00
Fix Windows archives extraction issue (#689)
This commit is contained in:
parent
292cc14be8
commit
83a06ff9d9
15 changed files with 154 additions and 104 deletions
11
src/util.ts
11
src/util.ts
|
@ -190,3 +190,14 @@ export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
|
|||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
// Rename archive to add extension because after downloading
|
||||
// archive does not contain extension type and it leads to some issues
|
||||
// on Windows runners without PowerShell Core.
|
||||
//
|
||||
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||
export function renameWinArchive(javaArchivePath: string): string {
|
||||
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||
fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||
return javaArchivePathRenamed;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue