mani icon indicating copy to clipboard operation
mani copied to clipboard

Allow environment variable reference in sync

Open BlueDrink9 opened this issue 10 months ago • 1 comments

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

BlueDrink9 avatar Feb 15 '25 02:02 BlueDrink9

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).

alajmo avatar Feb 19 '25 13:02 alajmo