Merge branch 'master' into iwahbe/8308/forbid-nonsensical-schema-flag-combinations

This commit is contained in:
Ian Wahbe 2021-11-19 16:19:24 -08:00
commit 3a80b48874
2 changed files with 6 additions and 3 deletions

View file

@ -24,5 +24,8 @@
- [codegen] - Forbid nonsensical combinations of schema property flags.
[#8373](https://github.com/pulumi/pulumi/pull/8373)
- [cli] - Catch expected errors in filestate backend stacks.
- [sdk/python] - Correctly handle version checking python virtual environments.
[#8465](https://github.com/pulumi/pulumi/pull/8465)
- [cli] - Catch expected errors in stacks with filestate backends.
[#8455](https://github.com/pulumi/pulumi/pull/8455)

View file

@ -678,7 +678,7 @@ func validateVersion(virtualEnvPath string) {
var versionCmd *exec.Cmd
var err error
versionArgs := []string{"--version"}
if virtualEnvPath == "" {
if virtualEnvPath != "" {
versionCmd = python.VirtualEnvCommand(virtualEnvPath, "python", versionArgs...)
} else if versionCmd, err = python.Command(versionArgs...); err != nil {
fmt.Fprintf(os.Stderr, "Failed to find python executable\n")
@ -701,6 +701,6 @@ func validateVersion(virtualEnvPath string) {
} else if parsed.LT(eolPythonVersion) {
fmt.Fprintf(os.Stderr, "Python %d.%d is approaching EOL and will not be supported in Pulumi soon."+
" Check %s for more details\n", parsed.Major,
eolPythonVersion.Minor, eolPythonVersionIssue)
parsed.Minor, eolPythonVersionIssue)
}
}