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

[Windows] path #54

Open
zaoqi opened this issue Jun 14, 2019 · 5 comments
Open

[Windows] path #54

zaoqi opened this issue Jun 14, 2019 · 5 comments

Comments

@zaoqi
Copy link

zaoqi commented Jun 14, 2019

run-pipeline: unix pipeline-segment (#<path:C:/Users/libre/scoop/apps/yarn/current/Yarn/bin\yarn>) terminated with code -1
@willghatch
Copy link
Owner

Interesting.

I'm not sure I fully understand what is going on here with that backslash. Can you give me the full command you used that gave this error? What do you get back when you run (find-executable-path "yarn") in Racket (or Rash)?

I'm traveling and busy for the next few weeks, so it may take me a while to get to this, unfortunately, but thank you for the report!

@zaoqi
Copy link
Author

zaoqi commented Jun 14, 2019

> (find-executable-path "yarn")
#<path:C:/Users/libre/scoop/apps/yarn/current/Yarn/bin\yarn>

@willghatch
Copy link
Owner

willghatch commented Jun 14, 2019 via email

@zaoqi
Copy link
Author

zaoqi commented Jun 15, 2019

@willghatch
Windows seems to ignore \, so Windows thinks that path is C:/Users/libre/scoop/apps/yarn/current/Yarn/binyarn.

@willghatch
Copy link
Owner

So I'm finally home from travelling and I fired up a Windows machine to test this out.

I can construct paths that have a mix of forward and back slashes using build-path, and they aren't inherently broken. Normally Racket seems to handle them properly. For example, (build-path "C:/Windows/system32" "winver.exe") gives me #<path:C:/Windows/system32\winver.exe>, but that runs fine when I use it with system* or subprocess.

I see that with subprocess on Windows I do get a status of -1 when I try to run a nonexistent file OR a file that exists but isn't a proper executable. So I wonder if somehow find-executable-path may decide that a file is executable even if it's not actually executable on your machine. Is C:/Users/libre/scoop/apps/yarn/current/Yarn/bin\yarn a valid Windows executable? I would expect it to probably have .exe on windows. Perhaps there is just another file in the directory that has executable permissions on the file system but isn't valid for Windows?

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

No branches or pull requests

2 participants