Problem Statement-> syntax error near unexpected token `$’do\r” error while running bash script.
using visual studio to write code on windows machine and the bash script is running on Linux github runner vm inside Terraform Local-exec command.
Root Cause -> Since i was using windows machine and visual studio to write code and the default setting was set to CRLF and the code was running on Linux machine which needs LF
Solution ->
1> Click on CRLF at the bottom of visual studio code windows

2> Select LF as shown below:

(Visited 144 times, 1 visits today)