microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

Make azure dns auto detection variable quoted in comparison #1670

Closed cwndrws closed 1 year ago

cwndrws commented 1 year ago

A user reported an issue when using this script that was caused by the variable in the comparison, AZURE_DNS_AUTO_DETECTION, being unset. Because the var is unset, the comparison interpolates to

[  = "true" ]

which is not valid syntax for the [ command.

with this change, when AZURE_DNS_AUTO_DETECTION is unset, the comparison will interpolate to:

[ "" = "true" ]

which is valid and "evaluates" to false.