-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
[bug] env-var. DOTDROP_WORKDIR does not work #437
Comments
@ShoHoukyo The
It may be a misunderstanding on the dotfiles:
f_abc:
dst: ~/.abc
src: abc The destination of the |
Thanks! I understand this is not intended use of dotdrop, but is there any way to output to 2 different dirs based on profile (like below)?
|
What you are trying to do is absolutely doable with dotdrop and there are multiple ways to achieve it:
dotfiles:
f_abc_profile1:
dst: ~/profile1/common/diff.toml
src: abc
f_abc_profile2:
dst: ~/profile2/common/diff.toml
src: abc
profiles:
profile1:
dotfiles:
- f_abc_profile1
profile2:
dotfiles:
- f_abc_profile2
variables:
basedst: "profile1"
dotfiles:
f_abc:
dst: "~/{{@@ basedst @@}}/common/diff.toml"
src: abc
profiles:
profile1:
dotfiles:
- f_abc
profile2:
dotfiles:
- f_abc
variables:
basedst: "profile2"
dotfiles:
f_abc:
dst: "~/{{@@ profile @@}}/common/diff.toml"
src: abc
profiles:
profile1:
dotfiles:
- f_abc
profile2:
dotfiles:
- f_abc
dotfiles:
f_abc:
dst: "~/{{@@ env['MY_DST_FOR_THIS_PROFILE'] @@}}/common/diff.toml"
src: abc
profiles:
profile1:
dotfiles:
- f_abc
profile2:
dotfiles:
- f_abc
dynvariables:
basedst: "cat /tmp/somefile | grep basedst= | sed 's/basedst=//g'"
dotfiles:
f_abc:
dst: "~/{{@@ basedst @@}}/common/diff.toml"
src: abc
profiles:
profile1:
dotfiles:
- f_abc
profile2:
dotfiles:
- f_abc And of course any combinations of the above. It all depends on your exact needs but that definitely enters dotdrop goals. |
Dotdrop version (and git commit if run from source): v1.14.0
Using dotdrop: pipx install dotdrop
Describe the bug
DOTDROP_WORKDIR: overwrite the workdir defined in the config
dotdrop/docs/usage.md
Line 304 in 7ee84a9
but DOTDROP_WORKDIR is not checked in file
dotdrop/dotdrop/options.py
Line 28 in 7ee84a9
as of dotdrop v1.14.0 (installed by
pipx install dotdrop
), env-var.DOTDROP_WORKDIR
does not work for commanddotdrop install
Expected behavior
DOTDROP_WORKDIR
used to determine final install locations (in my case, no link, just generate files)Additional information
The relevant part of the config file
(json is valid yaml)
The text was updated successfully, but these errors were encountered: