Chmod file permission

This commit is contained in:
Imran Ismail
2019-09-05 04:16:18 +08:00
parent c1ba496a1b
commit af8d62879a
3 changed files with 9 additions and 4 deletions

View File

@@ -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');

View File

@@ -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);
});
}

View File

@@ -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<string> {
throw `Failed to download version ${version}: ${err}`;
}
fs.chmodSync(downloadPath, 0o755);
return await tc.cacheFile(downloadPath, 'kustomize', 'kustomize', version);
}