Skip to content

Commit d449d75

Browse files
authored
lower permissions for chmod (#51)
1 parent 3866693 commit d449d75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/run.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('Testing all functions in run file.', () => {
106106
expect(toolCache.downloadTool).toBeCalled();
107107
expect(toolCache.cacheFile).toBeCalled();
108108
expect(os.type).toBeCalled();
109-
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '777');
109+
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '775');
110110
});
111111

112112
test('downloadKubectl() - throw DownloadKubectlFailed error when unable to download kubectl', async () => {
@@ -144,7 +144,7 @@ describe('Testing all functions in run file.', () => {
144144
expect(await run.downloadKubectl('v1.15.0')).toBe(path.join('pathToCachedTool', 'kubectl.exe'));
145145
expect(toolCache.find).toBeCalledWith('kubectl', 'v1.15.0');
146146
expect(os.type).toBeCalled();
147-
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '777');
147+
expect(fs.chmodSync).toBeCalledWith(path.join('pathToCachedTool', 'kubectl.exe'), '775');
148148
expect(toolCache.downloadTool).not.toBeCalled();
149149
});
150150

src/run.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export async function downloadKubectl(version: string): Promise<string> {
5757
}
5858

5959
const kubectlPath = path.join(cachedToolpath, kubectlToolName + getExecutableExtension());
60-
fs.chmodSync(kubectlPath, '777');
60+
fs.chmodSync(kubectlPath, '775');
6161
return kubectlPath;
6262
}
6363

0 commit comments

Comments
 (0)