mani
mani copied to clipboard
Allow environment variable reference in sync
Is your feature request related to a problem? Please describe
I want to clone to a directory outside the project, and I want it to be the same one for multiple projects.
Describe the solution you'd like
Allow passing and environment variables when you sync/initially clone the repos.
mani sync ROOT=/path/to/root
projects:
foo:
sync: true
path: $root/foo
url: bar
Additional context
Alternatively, ability to pass a different root path for the syncing, tasks etc via CLI
Good idea, will add it, in the meantime this works:
projects:
foo:
url: bar
path: $root/foo
Then run root=/path/to/root mani sync (note root is prefixed and not suffix).
This is because path already resolves environment variables (just not directly by parsing the CLI, but by looking at the shell environment variables).