Skip to content
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

directory --file breaks on ENV variables. #173

Open
quintrino opened this issue Mar 26, 2021 · 5 comments
Open

directory --file breaks on ENV variables. #173

quintrino opened this issue Mar 26, 2021 · 5 comments

Comments

@quintrino
Copy link

quintrino commented Mar 26, 2021

I seem to be running into an error with copying whole directories over when using a ENV in the path.

fresh config/espanso --file=~/.config/espanso/
works
fresh config/espanso --file=$XDG_CONFIG_HOME/espanso/
does not.

running
readlink ~/.config/espanso when I've used XDG_CONFIG produces
/Users/nick.wolf/.config/fresh/build/-Users-nick.wolf-.config-espanso

when the folder is created at
/Users/nick.wolf/.config/fresh/build/config-espanso

For the time being I've fixed it by using
fresh config/espanso --file=~/.config/espanso/

@twe4ked
Copy link
Member

twe4ked commented Apr 16, 2021

Interesting, can you try putting the following in your freshrc and see what the output is?

echo "$XDG_CONFIG_HOME/espanso/"

@quintrino
Copy link
Author

just /Users/nick.wolf/.config/espanso/ as expected.

If I change it from fresh config/espanso --file=~/.config/espanso/ to fresh config/espanso --file=$XDG_CONFIG_HOME/espanso/

My output is

ln: /Users/nick.wolf/.config/espanso/user/private.yml: No such file or directory
callback failed at /Users/nick.wolf/Applications/bin/fresh line 262.
	main::run_callback("after_build", "/Users/nick.wolf/.config/fresh/build") called at /Users/nick.wolf/Applications/bin/fresh line 872
	main::fresh_install() called at /Users/nick.wolf/Applications/bin/fresh line 1273
	main::main() called at /Users/nick.wolf/Applications/bin/fresh line 1306

@quintrino
Copy link
Author

Ah, it could be that the issue isn't coming from the fresh espanso line but later in the
fresh after build.
fresh_after_build(){
ln -sf ~/Drive/Sync/Mac/Espanso/private.yml $XDG_CONFIG_HOME/espanso/user/private.yml`
}

@quintrino
Copy link
Author

Ah, No, I think that just comes back to the issue that ~/.config/espanso is just a link to /Users/nick.wolf/.config/fresh/build/-Users-nick.wolf-.config-espanso and not a folder.

@twe4ked
Copy link
Member

twe4ked commented Apr 18, 2021

I tried to add a failing test, but it's passing.

I don't think I'm going to have time to look into this one. Keep us updated if you find any more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants