Possible to invoke a justfile as a shebang script via symbolic link ? #2633
simonmichael
started this conversation in
General
Replies: 4 comments 1 reply
-
|
This is one workaround: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Another: |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Perhaps it is a bug though, that (without these workarounds) the file specified explicitly with -f is not used ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'm not actually able to reproduce this. Check out this terminal session: $ mkdir foo
$ vim foo/justfile
$ chmod +x foo/justfile
$ ./foo/justfile
echo hello
hello
$ ln -s `pwd`/foo/justfile hello
$ ./hello
echo hello
helloI'm using symlinks with an absolute path on macOS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for just! I have
notes/Justfile, with executable permission and a shebang line likeThis works if I run it directly as
notes/Justfile, but not if I symlink it to a more convenient name likenotein PATH and then runnote. In that case it ignores its own recipes and uses recipes from another justfile in a parent directory. I guessjust's justfile finding logic is defeated by the unusual name.Is there way to make this work currently, and does anyone have ideas for how it could be made more robust ?
Beta Was this translation helpful? Give feedback.
All reactions