-
Notifications
You must be signed in to change notification settings - Fork 5
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
Mount directories directly into $HOME
#65
Conversation
After introducing of cirruslabs/tart#733 we can use different VirtioFS tags for different directories and precisely mount them into exact locations. `/Volumes/My Shared Files/` default path is error-prone since some tools don't like whitespaces in paths. With this change directories will be directly mounted into `$HOME`. Fixes #64
internal/commands/prepare/prepare.go
Outdated
defer session.Close() | ||
|
||
mountScript := fmt.Sprintf( | ||
"mount_virtiofs tart.virtiofs.%s /Users/%s/%s\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mount_virtiofs
expects a directory to be already created, so we should probably stuff an mkdir -p && ...
here to avoid the job failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch. See 012a73f
internal/commands/prepare/prepare.go
Outdated
defer session.Close() | ||
|
||
mkdirScript := fmt.Sprintf( | ||
"mkdir -p /Users/%s/%s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about abstracting Users/%s/%s
into separate variable to avoid mismatches between mkdir
and mount
invocations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. See 9e2887a
After introducing of cirruslabs/tart#733 we can use different VirtioFS tags for different directories and precisely mount them into exact locations.
/Volumes/My Shared Files/
default path is error-prone since some tools don't like whitespaces in paths. With this change directories will be directly mounted into$HOME
.Fixes #64