Azure / cli

Automate your GitHub workflows using Azure CLI scripts
MIT License
124 stars 52 forks source link

Fix #103: Escape double quotes in environment variables #104

Closed MoChilia closed 1 year ago

MoChilia commented 1 year ago

Description

This PR is going to escape double quotes in environment variables to fix #103.

Un-escaped double quotes will break parsing of the docker run command and results in a misleading message an error. In the previous version, we didn't check whether there are double quotes in the environment variables. https://github.com/Azure/cli/blob/68f0d36771d0cba0ebbf26993275a8e0b74a541f/src/main.ts#L53-L59 In this version, we aim to scan the incoming environment variables and escape the double quotes first with the function: https://github.com/Azure/cli/blob/ee92c5a8128f7b4160740a568f0bbcbe005d3e4b/src/utils.ts#L97-L99

Test workflows

Test with double quotes in env