redcode-labs / easyWSL

Create WSL distros based on Docker Images.
Other
554 stars 37 forks source link

post-install script is failing #17

Closed scadu closed 2 years ago

scadu commented 3 years ago

While playing with the easyWSL I noticed that the post-install script doesn't work correctly.

Examples:

mikenelson-io commented 3 years ago

This is still an issue. The new post-install.sh file is also erroring. ArchLinux: image

scadu commented 3 years ago

Looks like there's another post-install.sh in the Release directory which as I can see was generated during the build process, committed to the repository, and you actually use the version from the last build. I guess it's time to think about a CI/CD pipeline 😄. cc @unrooted

unrooted commented 3 years ago

Okay, I see. Still, thanks for your PR @scadu! We basically have to do some code cleaning up soon... we will do it with the next release (while also adding other features, stay tuned).

mikenelson-io commented 3 years ago

I copy/pasted the raw content of the post-install.sh that is located in the root of easyWSL/easyWSL/. That was the one recently modified. It has the addition of #!/usr/bin/env sh in line 1. Is that not the correct file?

scadu commented 3 years ago

@mikenelson-io Indeed, it's a correct file. I'll provide a fix in another PR.

scadu commented 3 years ago

@mikenelson-io I checked the script once again, and it works correctly. For some reason, I ignored that you copied the script focusing on the mysterious No such file or directory for /usr/bin/env. While copying, line endings have changed from LF (nix) to CRLF (Windows) resulting in a file that's not interpreted correctly by the nix shell. If you copy the script and save the file with the LF line endings, it should be better (VS Code, Notepad++ provides an option to change the file line endings easily).

mikenelson-io commented 3 years ago

I just slapped myself for not seeing that 🤦 It does indeed work with LF. Thank you for clarifying!

unrooted commented 3 years ago

Thanks, @scadu, for helping us with the post install script. We've cleaned up the project and the corrected the line endings too. You can build the master branch and see if it works as intended. We are planning to make a new release soon, but before that we want to test everything pretty extensively. If that's doable, can you please guys check whether it works right now, after the latest update when you build from the source code yourselves?

scadu commented 3 years ago

@unrooted Is it possible to add a build procedure to the readme? I wouldn't like to guess trying to work out a correct setup.

unrooted commented 2 years ago

@scadu hi, sorry for the late reply. I've just added build instructions to README in 1aa5825