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

Shell commands to git in build.jl don't work on Windows #129

Closed
kdayday opened this issue Dec 21, 2018 · 7 comments
Closed

Shell commands to git in build.jl don't work on Windows #129

kdayday opened this issue Dec 21, 2018 · 7 comments
Assignees

Comments

@kdayday
Copy link
Contributor

kdayday commented Dec 21, 2018

Haven't figured out a direct solution yet.

@jd-lara
Copy link
Member

jd-lara commented Dec 21, 2018

@kdayday can you provide more detail? All out build tests are passing in the CI, so it is likely your local git.

@jd-lara jd-lara self-assigned this Dec 21, 2018
@kdheepak
Copy link
Contributor

@kdayday can you tell us which git commands?

@kdayday
Copy link
Contributor Author

kdayday commented Dec 22, 2018

Yep, sorry, here's more info. It appears that using "run()" or accessing the shell through ";" doesn't work on Windows the way you'd expect for something called a "shell", discussed here:
JuliaLang/julia#23703
Not only do git commands not work, but other basic commands don't either, e.g. "echo hello" gets an error:
"ERROR: IOError: could not spawn echo hello: no such file or directory (ENOENT)"
I get the same "no such file or directory" error for the "git clone" call in build.jl, as well as with "dir", etc.

Two leads:

  1. It looks like the proper way of dealing with calls like "echo" in Julia's shell on Windows is "cmd /c echo hello", and this works for me. However, "cmd /c git init" gives me a new error: "'git' is not recognized as an internal or external command, operable program or batch file". So maybe at that point, it is a local git problem, or there is a different call besides "cmd" that I haven't found.
  2. It looks like the expected shell calls work if you run Julia from Git Bash:
    https://discourse.julialang.org/t/usable-shell-on-windows-yay/5988
    That seems wrong to assume users are working from Git Bash, and won't solve the problem for me in Jupyter Notebooks. I didn't go further to verify if I could get things working from Git Bash.

The general point being, these "run()" calls may be breakable across platforms, at least that's what it looks like for a newbie like me. In this specific case, maybe the question is whether and how to include the test data.

@kdheepak
Copy link
Contributor

Thanks for the detailed information. The build.jl just downloads a data git repository, if you don't need to run tests or examples you can comment it out and bypass it for now. We'll add a more portable fix soon.

@jd-lara jd-lara assigned kdheepak and unassigned jd-lara Dec 22, 2018
@jd-lara
Copy link
Member

jd-lara commented Dec 22, 2018

@kdheepak I can't reproduce the error in my windows machine. Seems that this can be fixed of the user has PoweShell

@kdheepak
Copy link
Contributor

kdheepak commented Dec 22, 2018 via email

@jd-lara
Copy link
Member

jd-lara commented Jan 4, 2019

I will close, this issue since it is not related to PowerSystems. This is an issue of the user set-up in Windows. cc. @kdayday @kdheepak

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

3 participants