Skip to content

Commit 9918121

Browse files
author
Sam Eagen
committed
Remove temporary geck fix, make sure chmod is not called on Windows
1 parent 70aa5bd commit 9918121

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/matlab.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,11 @@ export async function setupBatch(platform: string, architecture: string) {
125125
let matlabBatch: string = await tc.downloadTool(matlabBatchUrl);
126126
let cachedPath = await tc.cacheFile(matlabBatch, `matlab-batch${matlabBatchExt}`, "matlab-batch", "v1");
127127
core.addPath(cachedPath);
128-
const exitCode = await exec.exec(`chmod +x ${path.join(cachedPath, 'matlab-batch'+matlabBatchExt)}`);
129-
if (exitCode !== 0) {
130-
return Promise.reject(Error("Unable to make matlab-batch executable."));
128+
if (platform !== "win32") {
129+
const exitCode = await exec.exec(`chmod +x ${path.join(cachedPath, 'matlab-batch'+matlabBatchExt)}`);
130+
if (exitCode !== 0) {
131+
return Promise.reject(Error("Unable to make matlab-batch executable."));
132+
}
131133
}
132134
return
133135
}

src/mpm.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export async function setup(platform: string, architecture: string): Promise<str
2626
} else {
2727
mpmUrl = properties.mpmRootUrl + "maca64/mpm";
2828
}
29-
await exec.exec(`sudo launchctl limit maxfiles 65536 200000`, undefined, {ignoreReturnCode: true}); // g3185941
3029
break;
3130
default:
3231
return Promise.reject(Error(`This action is not supported on ${platform} runners using the ${architecture} architecture.`));
@@ -39,9 +38,11 @@ export async function setup(platform: string, architecture: string): Promise<str
3938
let mpmDest = path.join(runner_temp, `mpm${ext}`);
4039
let mpm: string = await tc.downloadTool(mpmUrl, mpmDest);
4140

42-
const exitCode = await exec.exec(`chmod +x "${mpm}"`);
43-
if (exitCode !== 0) {
44-
return Promise.reject(Error("Unable to set up mpm."));
41+
if (platform !== "win32") {
42+
const exitCode = await exec.exec(`chmod +x "${mpm}"`);
43+
if (exitCode !== 0) {
44+
return Promise.reject(Error("Unable to set up mpm."));
45+
}
4546
}
4647
return mpm
4748
}

0 commit comments

Comments
 (0)