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

Path error when deploying a go runtime from Windows #6482

Closed
lauw70 opened this issue Jul 31, 2019 · 1 comment · Fixed by #6484
Closed

Path error when deploying a go runtime from Windows #6482

lauw70 opened this issue Jul 31, 2019 · 1 comment · Fixed by #6484

Comments

@lauw70
Copy link
Contributor

lauw70 commented Jul 31, 2019

This is a Bug Report

Description

When determining which files should have an 'executable' flag during the packaging process, paths are not normalized before matching. The pull request that introduced this issue is #5813.
The following paths are not matched:

  • dist/server
  • dist\server

There is a simple fix: normalize both paths before matching.
Change


To
.map(f => path.normalize(f.handler));

Similar or dependent issues:

Additional Data

  • Operating System: Windows
@lauw70
Copy link
Contributor Author

lauw70 commented Sep 15, 2019

@pmuens The fix I wrote didn't do the job. Another line must be change:

const name = file.filePath.slice(prefix ? `${prefix}${path.sep}`.length : 0);

must be changed to:
const name = file.filePath.slice(prefix ? `{prefix}${path.sep}`.length : 0).replace(/\\/g,"/");

path.normalize does not a good job so a regex fix is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants