Skip to content
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

Paths backslashes are not escaped on Windows #1608

Closed
johhnry opened this issue May 25, 2023 · 1 comment · Fixed by #2166
Closed

Paths backslashes are not escaped on Windows #1608

johhnry opened this issue May 25, 2023 · 1 comment · Fixed by #2166

Comments

@johhnry
Copy link

johhnry commented May 25, 2023

Hi,

This is a simple justfile where I want to use the absolute_path function on Windows:

default:
    @just --list

echo-path:
    ls {{absolute_path(".")}}

What I get is this:

$ just echo-path
ls C:\Users\jhenry\project
ls: cannot access 'C:Usersjhenryproject': No such file or directory
error: Recipe `echo-path` failed on line 5 with exit code 2

What is wrong here?

Thanks!

  • Just 1.13.0
@casey
Copy link
Owner

casey commented Jun 15, 2024

Can't believe I let this sit for so long!

WIndows paths contain backslashes so they need to be quoted:

echo-path:
    ls '{{absolute_path(".")}}'

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 a pull request may close this issue.

2 participants