Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Command in docker-in-docker-debian.sh due to "core.autocrlf true" on Windows #30

Open
DanWahlin opened this issue Aug 27, 2022 · 0 comments

Comments

@DanWahlin
Copy link

DanWahlin commented Aug 27, 2022

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Clone the repo to a Windows machine where git is configured globally to core.autocrlf true.
  2. Open the project in VS Code and allow it to restart in a Remote Container environment.
  3. You'll get an error related to the docker-in-docker-debian.sh file (CRLF error on Line 11, 18, etc.).
  4. Process fails as a result of the above error.

Any log messages given by the failure

Invalid command in docker-in-docker-debian.sh (unrecognized command is the result of \r endings)

Expected/desired behavior

Start up the Remote Container environment.

OS and Version?

Windows 10 21H2 (OS Build 19044.1889) - I'm on a virtual machine provided to me for use in another scenario

Versions

VS Code 1.70.2

Mention any other details that might be useful

It looks like this is an issue with how git is configured on this particular Windows machine. I did the following to fix the issue:

  • Ran git config --global core.autocrlf false
  • Recloned the project and allowed VS Code to run the Remote Container environment.

It might be helpful to mention this in the build-and-run.md file for others who may hit the issue on Windows. Another option to help make it automatic would be to add a .gitattributes file with * text=auto eol=lf in it (although I'd have to validate that in this case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant