Merge "IsEnvTrue and IsEnvFalse should take True
and False
as valid values respectively." into main am: c9b4d4c584
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3070703 Change-Id: I71a0c74e961171b74dc3870aed6428f60b38ff18 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -818,12 +818,12 @@ func (c *config) GetenvWithDefault(key string, defaultValue string) string {
|
||||
}
|
||||
|
||||
func (c *config) IsEnvTrue(key string) bool {
|
||||
value := c.Getenv(key)
|
||||
value := strings.ToLower(c.Getenv(key))
|
||||
return value == "1" || value == "y" || value == "yes" || value == "on" || value == "true"
|
||||
}
|
||||
|
||||
func (c *config) IsEnvFalse(key string) bool {
|
||||
value := c.Getenv(key)
|
||||
value := strings.ToLower(c.Getenv(key))
|
||||
return value == "0" || value == "n" || value == "no" || value == "off" || value == "false"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user