11

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?

2
  • 2
    Git doesn't have a line ending bug. However, depending on your git settings, it might propagate Windows line endings into your Linux box. Read help.github.com/en/articles/dealing-with-line-endings (read both Linux and Windows page) to understand the issue to solve it long-term. Right now, it's easiest to use dos2unix and re-commit the file. Commented Apr 18, 2019 at 6:59
  • if i run this command from terminal "/bin/sh -c /opt/docker/bin/service.d/autosync.sh install" it says "install: 1: install: /opt/docker/bin/service.d/autosync.sh: not found" Commented Apr 18, 2019 at 7:38

3 Answers 3

16

In VSCODE you can use: VSCODE Editor Bar

LF can be changed in CRLF and back

Sign up to request clarification or add additional context in comments.

Comments

5

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

Comments

2

You get this error message simply because the /dev folder is not in /bin. It is directly in the /flutter folder so change your path this way solve this problem:

export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter"

1 Comment

This is not working for me. When doing it this way the dart executable can not be found, obviously.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.