lower permissions for chmod (#51)
This commit is contained in:
@@ -106,7 +106,7 @@ describe('Testing all functions in run file.', () => {
|
|||||||
expect(toolCache.downloadTool).toBeCalled();
|
expect(toolCache.downloadTool).toBeCalled();
|
||||||
expect(toolCache.cacheFile).toBeCalled();
|
expect(toolCache.cacheFile).toBeCalled();
|
||||||
expect(os.type).toBeCalled();
|
expect(os.type).toBeCalled();
|
||||||
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '777');
|
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '775');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('downloadKubectl() - throw DownloadKubectlFailed error when unable to download kubectl', async () => {
|
test('downloadKubectl() - throw DownloadKubectlFailed error when unable to download kubectl', async () => {
|
||||||
@@ -144,7 +144,7 @@ describe('Testing all functions in run file.', () => {
|
|||||||
expect(await run.downloadKubectl('v1.15.0')).toBe(path.join('pathToCachedTool', 'kubectl.exe'));
|
expect(await run.downloadKubectl('v1.15.0')).toBe(path.join('pathToCachedTool', 'kubectl.exe'));
|
||||||
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0');
|
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0');
|
||||||
expect(os.type).toBeCalled();
|
expect(os.type).toBeCalled();
|
||||||
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '777');
|
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '775');
|
||||||
expect(toolCache.downloadTool).not.toBeCalled();
|
expect(toolCache.downloadTool).not.toBeCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export async function downloadKubectl(version: string): Promise<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const kubectlPath = path.join(cachedToolpath, kubectlToolName + getExecutableExtension());
|
const kubectlPath = path.join(cachedToolpath, kubectlToolName + getExecutableExtension());
|
||||||
fs.chmodSync(kubectlPath, '777');
|
fs.chmodSync(kubectlPath, '775');
|
||||||
return kubectlPath;
|
return kubectlPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user