You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
windar022
changed the title
Windows script requires escape chars to run successfully, Linux script does not
Windows script requires escape special chars to run successfully
Mar 6, 2024
Expected Behavior
Windows and Linux script should behave the same way when you are writing the scripts. Windows should not require to escape special chars.
Actual Behavior
Windows and Linux scripts are considering different validations about escaping chars
For example for windows you need to create the script as follow, if not the var are going to be added to the file as an empty value:
For Linux cases it is not necessary to keep escaping char, so the coding is more natural.
Steps to Reproduce the Problem
Additional Info
A possible solution is to encode the script before create the file, like the non windows script logic https://github.com/tektoncd/pipeline/blob/main/pkg/pod/script.go#L189
When a script requires windows, the script can be encoded and then create the output file command like the following example:
https://github.com/tektoncd/pipeline/blob/main/pkg/pod/script.go#L177C3-L180C23
v1.27.9
v0.56.1
The text was updated successfully, but these errors were encountered: