cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ERROR: $'\r': command not found - Chef scripts fail when checking out on Windows environment

ERROR: $'\r': command not found - Chef scripts fail when checking out on Windows environment

Any errors with $'\r': command not found

 

This is due to the autocrlf setting on your git.config it is automatically converting newline chars to Windows style newlines. For chef scripts, this is bad. Change your git config to:

 

[core]

  autocrlf = input

 

This will keep unix style newline chars and change them to unix style on check in (or whatever your original file is). Also, change your IDE and editors you use to edit scripts to use unix style chars.

Version history
Revision #:
2 of 2
Last update:
‎Feb 15, 2023 10:13 AM
Updated by:
 
Contributors