casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
17.6k stars 399 forks source link

Doc example errors with python on Windows #2010

Open eugenesvk opened 3 weeks ago

eugenesvk commented 3 weeks ago

Direct invocation works

$ python -c `print("foo" * 4)`
foofoofoofoo

But the example from the ReadMe fails

# use python3 to execute recipe lines and backticks
set shell := ['python', "-c"]
# use print to capture result of evaluation
foos := `print("foo" * 4)`
foo:
  print("{{foos}}")

Has a strange error I don't understand the cause of, why did the closing " disappear, and what's up with ")int("?

just foo
")int("foofoofoofoo
  File "<string>", line 1
    print("foofoofoofoo
          ^
SyntaxError: unterminated string literal (detected at line 1)
error: Recipe `foo` failed on line 6 with exit code 1

Python 3.12, Windows 10, tried in cmd, pwsh,