Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 88aaa1c

Browse files
authored
Merge pull request #1170 from humblec/env
Make env also used while naming provisioner.
2 parents 65ee173 + b984892 commit 88aaa1c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gluster/block/cmd/glusterblock-provisioner/glusterblock-provisioner.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,10 @@ func main() {
905905
provName := provisionerName
906906
provEnvName := os.Getenv(provisionerNameKey)
907907

908-
// Precedence is given for ProvisionerNameKey
909-
if provEnvName != "" && *id != "" {
908+
// Precedence is given for ProvisionerNameKey if both are set
909+
if provEnvName != "" && *id != "" || provEnvName != "" {
910910
provName = provEnvName
911-
}
912-
913-
if provEnvName == "" && *id != "" {
911+
} else if *id != "" {
914912
provName = *id
915913
}
916914

0 commit comments

Comments
 (0)