Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves the error which occurs when calling setup-matlab twice in single workflow #135

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

Vahila
Copy link
Contributor

@Vahila Vahila commented Feb 13, 2025

The error is occurring when mpm was getting downloaded in second setup-matlab call as the file already exists.

Current fix is to check if mpm file exists before downloading it.

@Vahila Vahila changed the title Resolvers the error which occurs when calling setup-matlab twice in single workflow Resolves the error which occurs when calling setup-matlab twice in single workflow Feb 13, 2025
Copy link
Member

@mcafaro mcafaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like something broke with the macos-14, R2023a job.

src/mpm.ts Outdated
@@ -37,15 +38,21 @@ export async function setup(platform: string, architecture: string): Promise<str
return Promise.reject(Error("Unable to find runner temporary directory."));
}
let mpmDest = path.join(runner_temp, `mpm${ext}`);
let mpm: string = await tc.downloadTool(mpmUrl, mpmDest);
if (!fs.existsSync(mpmDest)){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If MPM already exists on the system, it might be better to delete it and redownload rather than skip downloading. I'm just thinking about self-hosted runners where they may have downloaded MPM a long time ago and its now a very out-of-date version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I updated the logic to delete the MPM file. Incidentally it also resolves the macos-14, R2023a job failure as well.

@mcafaro mcafaro self-requested a review February 18, 2025 14:41
@Vahila Vahila merged commit b41cf6a into main Feb 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants