gitdockernewlinewindows-subsystem-for-linuxcore.autocrlf

/usr/bin/env: ‘bash\r’: No such file or directory


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?


Solution

  • I solved it by finding that autosync.sh somewhere in my projects hidden and changed file format to Unix and boom it worked.