diff --git a/src/run.test.ts b/src/run.test.ts index a25dad2..e82e04a 100644 --- a/src/run.test.ts +++ b/src/run.test.ts @@ -106,7 +106,7 @@ describe('Testing all functions in run file.', () => { expect(toolCache.downloadTool).toBeCalled(); expect(toolCache.cacheFile).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 () => { @@ -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(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0'); 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(); }); diff --git a/src/run.ts b/src/run.ts index 5a2d2f6..59ae093 100644 --- a/src/run.ts +++ b/src/run.ts @@ -57,7 +57,7 @@ export async function downloadKubectl(version: string): Promise { } const kubectlPath = path.join(cachedToolpath, kubectlToolName + getExecutableExtension()); - fs.chmodSync(kubectlPath, '777'); + fs.chmodSync(kubectlPath, '775'); return kubectlPath; }