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

mkdir -p not working on windows #40

Open
chahank opened this issue Jul 7, 2020 · 5 comments
Open

mkdir -p not working on windows #40

chahank opened this issue Jul 7, 2020 · 5 comments

Comments

@chahank
Copy link

chahank commented Jul 7, 2020

The elevation package can create problems on Windows machine because the command 'mkdir -p' does not work. It should be replaced by 'mkdir'. Recursivity (flag p) is natively included in 'mkdir' on Windows.

One quick and dirty solution would be to modify 'datasource.mk' and check if the OS is Windows, in which case the code should use 'mkdir' , else 'mkdir -p'.

Could the developers please comment whether there is any argument speaking against such a change?

@chahank
Copy link
Author

chahank commented Jul 29, 2020

Is there still anyone active on this repository?

@alexamici
Copy link
Member

I'm sorry the tools has been design to work on Linux/MacOS/Unix and I never tested it on Windows. It may work using the Windows Subsystem for Linux (WSL), but it is not supported.

@chahank
Copy link
Author

chahank commented Jul 29, 2020

Thanks for the reply! That is what we figured out. We tested the package quite a bit also on Windows and found that:

  • make can be installed with conda
  • unzip can be globally installed with UnxUtils
  • mv dito
  • find dito, but the PATH must be set before the winows command find

However,

  • mkdir from UnxUtils won't work because option -p is ignored.

This could be easily solved by using mkir from windows directly, but this must be done without the -p flag (the windows mkdir applied the flag implicitly). Hence, a simple solution to make the package usable would be to add an if statement to use mkdir instead of mkdir -p when the system is windows.

@gdt
Copy link

gdt commented Jul 29, 2020

You might consider filing a bug with windows that it is not implementing the -p option which is required by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/

While that seems hard, it would probably make a lot of things work better on Windows if it were fixed.

@chahank
Copy link
Author

chahank commented Jul 31, 2020

Thanks for the idea. However, I do not think this would quickly fix the problem (if it is done at all).

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