casey / casey/just

Should `absolute_path` expand tildes?

Open
#2,887 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

I was trying to do something like the following:

```just
export KUBECONFIG := if path_exists("~/.kube/config") != "true" {
invocation_directory() / ".kubeconfig"
} else {
absolute_path("~/.kube/config")
}
```

but that results in a `$KUBECONFIG` of literally '~/.kube/config' which doesn't work.

---

I also just realized as I was typing this up, that `path_exists` doesn't expand the tilde either. Should there be a different function instead, used to expand the tilde syntax?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.