0

I cloned this repo on WSL2 https://github.com/apache/airflow/blob/main/dev/breeze/doc/01_installation.rst#docker-in-wsl-2 and tried to build a docker image that uses also this script https://github.com/apache/airflow/blob/main/scripts/docker/install_os_dependencies.sh, but this error appears: ERROR [main 4/34] RUN bash /scripts/docker/install_os_dependencies.sh dev 0.7s [main 4/34] RUN bash /scripts/docker/install_os_dependencies.sh dev: : invalid option name/install_os_dependencies.sh: line 2: set: pipefail

pipefail error

I found from this question set: pipefail failing on WSL windows 11 ubuntu 22.04.3 that the problem is that the file is not Linux formatted. I thought that WSL is POSIX compliant, but apparently it is not.

I reformatted the file to unix with dos2unix, library suggested in that question, but it still throws this error.

Please help, cause I am stuck. Also, is there any way to do the WSL folders to be POSIX compliant?

Thank you!

criss
  • 1
  • Please verify that your changes with dos2unix took effect using file /scripts/docker/install_os_dependencies.sh – steeldriver Mar 21 '24 at 20:35
  • Thanks steeldriver, I did, the file is now: scripts/docker/install_os_dependencies.sh: Bourne-Again shell script, ASCII text executable, while before it was Bourne-Again shell script, ASCII text executable, with CRLF line terminators. So dos2unix removed that problematic CRLF terminators, but the script still does not work. Any more ideas? – criss Mar 25 '24 at 07:37
  • Sorry - I can't think of anything else that would cause the exact symptom where the error description invalid option name gets moved to the start of the message and overwrites the filename like that – steeldriver Mar 25 '24 at 11:58

0 Answers0