I am having an issue after setting up docker in Linux terminal in win10. When I am trying to build it shows following error.
/usr/bin/env: ‘bash\r’: No such file or directory
ERROR: Service 'magento2' failed to build: The command '/bin/sh -c /opt/docker/bin/service.d/autosync.sh install && docker-service-enable autosync' returned a non-zero code: 127
Is it git line ending bug and how can I solve it?
As we mentioned earlier,#!/usr/bin/env bash is also a shebang line used in script files to execute commands with the Bash shell. It uses the env command to display the environment variables present in the system and then execute commands with the defined interpreter.
In VSCODE you can use: VSCODE Editor Bar
LF can be changed in CRLF and back
I solved it by finding that autosync.sh somewhere in my projects hidden and changed file format to Unix and boom it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With