Open ekarious opened 3 months ago
If I add a rename
to the dotfiles element, I can remove the windows
from the path.
But it should not be necessary when the target path is specified.
Hey @ekarious thanks for reporting this and sorry for the very late response.
What you describe, is indeed a bug and the rename
workaround should not be necessary.
I will take a look if i can reproduce this and then fix it.
Had a quick look and found a few issues:
In your example you have the field target.path
set for a dotfile
. This field does not exist on a dotfile
, the field meant to be used for this is overwrite_target
.
Currently punktf will only return an error about unused/unknown variables if they are on the profile
level, all "sublevel" (e.g. dotfiles) are not checked.
This is a bug and i will fix it.
I don't if your example is representative of your actual profile, but if it is, i would suggest to actually use rename
:
target: "C:\\Users\\Yann\\Desktop\\test_dotfiles"
dotfiles:
- path: windows/alacritty.toml
rename: "alacritty.toml"
template: false
This should deploy the file to the default profile.target with the name/relative path alacritty.toml
.
While looking through the code for the path resolution, i also noticed that even if you would have used overwrite_target
, it would not have worked.
I think you are correct with our assumption of how this value should work and will adjust it in this way, also i no longer like the original name of overwrite_target
and will rename it to target
instead (will probably keep the old name around for backwards compatibility).
After i implement all these changes your given example should almost work in the way you described/expected it to work.
target: "C:\\Users\\Yann\\Desktop\\test_dotfiles"
dotfiles:
- path: windows/alacritty.toml
target: "C:\\Users\\Yann\\Desktop\\test_dotfiles\\alacritty.toml"
template: false
Thank you very much for the feedback/report 😄
I will keep you updated but it might take a few days for me to implement all of that
Thank you very much for the response. Glad I could help you enhanced it :)
Describe the bug Bug to the path of uploaded files
To Reproduce When You have a structure like this:
and
windows.yaml
file like this:The problem is the file is sent to this path:
The
windows
in the path should not be included.Expected behavior This should be the correct path:
Desktop (please complete the following information):
Additional Infos I have set the Env Variable:
PUNKTF_SOURCE = C:\Users\Yann\.dotfiles