Backtick failed with exit code 1
Hi there, I have this issue, is it my fault or a bug? It worked about half of a year ago, and failed when I was trying to run the command today.
me@workstation ~ % just ssh-dev
error: Backtick failed with exit code 1
|
33 | model-path := `ssh [email protected] 'journalctl -qr | grep --perl-regexp "\/tmp\/\d+" -m 1 -o'`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The model-path constant is NOT used in the command I was running.
It looks like it's just the command returning an error. What happens when you run it in the terminal? (And check the exit code with echo $?)
If I run the underlying command in terminal it works just fine, this is simple ssh call.
I just noticed, that no one just command works with my config. I'll try to clean it line by line to catch bad config part.
echo $1 returns 1.
Interesting. I can't think of why it would fail in just but not in the shell.
What program is just using to run the backticks?
Does the issue persist if you explicitly set the shell for this justfile to match the shell you're using in terminal?
This is somewhat mysterious and possibly spurious, so I am going to be optimistic and close it 😅