/usr/bin/env: ‘bash\r’: No such file or directory [duplicate]
Asked Answered
S

3

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?

Stingaree answered 18/4, 2019 at 6:55 Comment(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.Ductile
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"Stingaree
S
5

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

Stingaree answered 18/4, 2019 at 8:39 Comment(0)
Y
16

In VSCODE you can use: VSCODE Editor Bar

LF can be changed in CRLF and back

Yablon answered 30/5, 2021 at 16:16 Comment(0)
S
5

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

Stingaree answered 18/4, 2019 at 8:39 Comment(0)
I
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"
Impost answered 9/6, 2020 at 18:56 Comment(1)
This is not working for me. When doing it this way the dart executable can not be found, obviously.Zollie

© 2022 - 2024 — McMap. All rights reserved.