diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 92ab262..5217b42 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -19,10 +19,10 @@ describe('installer tests', () => { await io.rmRF(tempDir); }, 100000); - afterAll(async () => { - await io.rmRF(toolDir); - await io.rmRF(tempDir); - }, 100000); + // afterAll(async () => { + // await io.rmRF(toolDir); + // await io.rmRF(tempDir); + // }, 100000); it('Acquires version of kustomize if no matching version is installed', async () => { await installer.getKustomize('3.1.0'); diff --git a/lib/installer.js b/lib/installer.js index 34371de..431bcc7 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -23,6 +23,7 @@ const restm = __importStar(require("typed-rest-client/RestClient")); const os = __importStar(require("os")); const path = __importStar(require("path")); const semver = __importStar(require("semver")); +const fs = __importStar(require("fs")); let osPlat = os.platform(); let osArch = os.arch(); if (!tempDirectory) { @@ -161,6 +162,7 @@ function acquireKustomize(version) { core.debug(err); throw `Failed to download version ${version}: ${err}`; } + fs.chmodSync(downloadPath, 0o755); return yield tc.cacheFile(downloadPath, 'kustomize', 'kustomize', version); }); } diff --git a/src/installer.ts b/src/installer.ts index d25a939..72d7d92 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -6,6 +6,7 @@ import * as restm from 'typed-rest-client/RestClient'; import * as os from 'os'; import * as path from 'path'; import * as semver from 'semver'; +import * as fs from 'fs'; let osPlat: string = os.platform(); let osArch: string = os.arch(); @@ -169,5 +170,7 @@ async function acquireKustomize(version: string): Promise { throw `Failed to download version ${version}: ${err}`; } + fs.chmodSync(downloadPath, 0o755); + return await tc.cacheFile(downloadPath, 'kustomize', 'kustomize', version); } \ No newline at end of file