Skip to content

Add --tempdir command-line option #2798

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

Merged
merged 5 commits into from
Jun 29, 2025
Merged

Add --tempdir command-line option #2798

merged 5 commits into from
Jun 29, 2025

Conversation

casey
Copy link
Owner

@casey casey commented Jun 29, 2025

No description provided.

@W1M0R
Copy link

W1M0R commented Jun 30, 2025

Thanks @casey, this looks great.

@kenden
Copy link
Contributor

kenden commented Jul 1, 2025

@casey I'm getting a weird behavior when using ~

just --tempdir=~/tmp foo
error: Recipe `foo` could not be run because of an IO error while trying to create a temporary directory or write a file to that directory: No such file or directory (os error 2) at path "/home/myredacteduser/dev/~/tmp/just-3FlApn"

But this works:

$ mkdir tmp
$ just --tempdir=tmp foo

Maybe --tempdir should take an absolute path.

@casey
Copy link
Owner Author

casey commented Jul 1, 2025

@kenden ~ is expanded by the shell, and is only expanded if it is the first character of a whitespace-delimited word. Try this:

just --tempdir ~/tmp foo

@kenden
Copy link
Contributor

kenden commented Jul 1, 2025

@casey thanks, I didn't know ~ / tilde is only expanded if it is the first character of a whitespace-delimited word.
It works 👍

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.

3 participants