Skip to content

Commit 6a47b68

Browse files
author
Sam Eagen
committed
No need to chmod on Windows
1 parent 3d927ba commit 6a47b68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tasks/install-matlab/v1/src/matlab.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ export async function setupBatch(platform: string, architecture: string) {
144144
} catch (err: any) {
145145
throw new Error("Failed to add MATLAB to system path.");
146146
}
147-
const exitCode = await taskLib.exec("chmod", ["+x", path.join(matlabBatchPath, "matlab-batch" + matlabBatchExt)]);
148-
if (exitCode !== 0) {
149-
return Promise.reject(Error("Unable to add execute permissions to matlab-batch binary."));
147+
if (platform !== "win32") {
148+
const exitCode = await taskLib.exec("chmod", ["+x", path.join(matlabBatchPath, "matlab-batch" + matlabBatchExt)]);
149+
if (exitCode !== 0) {
150+
return Promise.reject(Error("Unable to add execute permissions to matlab-batch binary."));
151+
}
150152
}
151-
return;
152153
}
153154

154155
export async function installSystemDependencies(platform: string, architecture: string, release: string) {

0 commit comments

Comments
 (0)