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

Expand paths which use tilde #141

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Expand paths which use tilde #141

merged 1 commit into from
Aug 30, 2024

Conversation

omus
Copy link
Collaborator

@omus omus commented Aug 29, 2024

I noticed a bug with #140 where the registry failed to be updated:

...
626M    /home/runner/.julia/registries
20K     /home/runner/.julia/scratchspaces
1.1G    total
Run if [ -d "~/.julia/registries" ] && [ -n "$(ls -A "~/.julia/registries")" ]; then
Registries directory does not exist or is empty. Skipping registry update

The problem turned out to be that using ~ in a quoted path doesn't expand it which results in failed checks:

❯ [ -d "~/.julia/registries" ] && [ -n "$(ls -A "~/.julia/registries")" ] && echo pass

❯ [ -d "$HOME/.julia/registries" ] && [ -n "$(ls -A "$HOME/.julia/registries")" ] && echo pass
pass

Seems best we just use the expanded path to avoid these kind of mistakes from occurring again.

@omus omus requested a review from IanButterworth August 29, 2024 21:47
@IanButterworth IanButterworth merged commit e662c42 into main Aug 30, 2024
19 checks passed
@IanButterworth IanButterworth deleted the cv/expand-tilde branch August 30, 2024 12:54
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

Successfully merging this pull request may close these issues.

None yet

2 participants