Skip to content

Expand paths which use tilde#141

Merged
IanButterworth merged 1 commit intomainfrom
cv/expand-tilde
Aug 30, 2024
Merged

Expand paths which use tilde#141
IanButterworth merged 1 commit intomainfrom
cv/expand-tilde

Conversation

@omus
Copy link
Copy Markdown
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
@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.

2 participants