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

GitHub action does not work on Windows #138

Closed
slavek-kucera opened this issue Feb 12, 2025 · 5 comments · Fixed by #139
Closed

GitHub action does not work on Windows #138

slavek-kucera opened this issue Feb 12, 2025 · 5 comments · Fixed by #139
Assignees

Comments

@slavek-kucera
Copy link

When running the action on a Windows host the action fails to locate the pom.xml file.
The following error message is produced:

Error: No file in D:\a\che-che4z-lsp-for-cobol\che-che4z-lsp-for-cobol matched to [**/pom.xml], make sure you have checked out the target repository

The problem seems to be due to the failure of the require('path') and the fallback to sep: '/' on the line 37866:
https://github.com/graalvm/setup-graalvm/blob/f07b5bfaefd6e145798e0bc9570232df4c3f8d17/dist/main.js#L37866
producing

ReferenceError: require is not defined
...
@fniephaus
Copy link
Member

Thanks for reporting, @slavek-kucera. I believe this is caused by #134 so I have reverted v1 to point to v1.2.8.

Where do you see the ReferenceError? Could you provide a link to the failing build?

@fniephaus fniephaus self-assigned this Feb 12, 2025
@slavek-kucera
Copy link
Author

The ReferenceError is produced in the following code from dist/main.js around line 37866 (if you add a console.log)

function requireMinimatch () {
	if (hasRequiredMinimatch) return minimatch_1;
	hasRequiredMinimatch = 1;
	minimatch_1 = minimatch;
	minimatch.Minimatch = Minimatch;

	var path = (function () { try { return require('path') } catch (e) { /**************** RIGHT HERE *********************/ }}()) || {
	  sep: '/'
	};

Example of a failing job: https://github.com/eclipse-che4z/che-che4z-lsp-for-cobol/actions/runs/13288065104/job/37102010699

@fniephaus
Copy link
Member

Thanks for the link. I was hoping you can explain how you found out about the ReferenceError? I don't see it being thrown in the log file.

@slavek-kucera
Copy link
Author

An afternoon debugging session... I was running the main.js directly reducing the scope until I found this.

@fniephaus
Copy link
Member

An afternoon debugging session

Thanks for looking into this and spending your time on this. I have prepared #139 which should fix this issue for now.

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 a pull request may close this issue.

2 participants