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

Canonicalize the host path passed to --mapdir #4018

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

Michael-F-Bryan
Copy link
Contributor

@Michael-F-Bryan Michael-F-Bryan commented Jun 21, 2023

This PR patches the logic for --mapdir so we always use absolute paths when mounting directories.

Ideally we wouldn't need to do this canonicalizing because the code for mounting directories should be able to handle relative paths, but this quickfix should resolve things until we do our big filesystem layer overhaul.

Fixes #4010.

@Michael-F-Bryan Michael-F-Bryan marked this pull request as ready for review June 21, 2023 04:07
@Michael-F-Bryan Michael-F-Bryan force-pushed the mapdir-relative-paths branch from 3439da5 to 5df6e63 Compare June 21, 2023 05:18
Copy link
Contributor

@theduke theduke left a comment

Choose a reason for hiding this comment

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

I thought some of my additions already added always canonicalizing to an absolute path , at least in the WASI runner.

But it makes sense to move this a bit higher up.

As mentioned previously, I don't think it makes any sense to have relative paths here apart from the CLI argument phase.

lib/wasix/src/runners/mod.rs Show resolved Hide resolved
@Michael-F-Bryan Michael-F-Bryan merged commit 8435873 into master Jun 21, 2023
@Michael-F-Bryan Michael-F-Bryan deleted the mapdir-relative-paths branch June 21, 2023 16:52
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.

--mapdir seems to needs an absolute path for the host folder
3 participants