-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
In the example below, the user would expect ${WORKSPACE} to be substitutes for the workspace path. The snippitzer returns the parameter surrounded in single quotes so the replace does not happen. In this scenario, the snippitezer should return the parameter in double quotes and either convert the exiting double quotes to single, or properly escape them.
It could detect a parameter value which looks like it was meant to be a GString. Ultimately it is up to the author of the script to decide what was meant. For example, you rarely want to do Groovy-side interpolation of the script argument to sh (or bat or powershell), since it is safer and better to have the external process load that value as an environment variable.