just icon indicating copy to clipboard operation
just copied to clipboard

Backtick failed with exit code 1

Open shadow-identity opened this issue 2 years ago • 4 comments

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.

shadow-identity avatar Nov 16 '23 10:11 shadow-identity

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 $?)

casey avatar Nov 16 '23 21:11 casey

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.

shadow-identity avatar Nov 21 '23 16:11 shadow-identity

Interesting. I can't think of why it would fail in just but not in the shell.

casey avatar Nov 22 '23 02:11 casey

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?

laniakea64 avatar Nov 22 '23 14:11 laniakea64

This is somewhat mysterious and possibly spurious, so I am going to be optimistic and close it 😅

casey avatar Jun 24 '25 07:06 casey