According to https://github.com/Azure/cli/pull/57#discussion_r1414938960, stderr should never be used as an indicator of failure for Azure CLI commands. This pr identifies Azure CLI errors based on exit codes rather than relying on stderr. As stated in child_process.exec, any error resulting in an exit code other than 0 will lead to a rejected promise, throwing an error. Hence, the flow to L35 implies that the exit code for L34 is 0.
Description
According to https://github.com/Azure/cli/pull/57#discussion_r1414938960,
stderr
should never be used as an indicator of failure for Azure CLI commands. This pr identifies Azure CLI errors based on exit codes rather than relying onstderr
. As stated in child_process.exec, any error resulting in an exit code other than 0 will lead to a rejected promise, throwing an error. Hence, the flow to L35 implies that the exit code for L34 is 0.