cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.67k stars 103 forks source link

Simpler DirectoryShare parsing and --dir documentation improvements #734

Closed edigaryev closed 5 months ago

edigaryev commented 5 months ago

This reduces the cognitive complexity of DirectoryShare parsing code by moving the options parsing logic (ro and tag) into a separate method and also allows specifying options in any order (e.g. /Users/admin/build:tag=foo-bar,ro).

Also, the docs for --dir now looks like this:

Screenshot 2024-02-19 at 23 43 28

The [name:]path[:ro,tag=virtiofs-mount-tag] format unfortunately does not allow us to express the available option combinations properly, so I think it would be a nice idea to reduce the cognitive load and abstract away the notion of "options" altogether into discussion section.