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:
Aditya Kumar
2024-05-02 18:21:15 +00:00
committed by Automerger Merge Worker

View File

@@ -818,12 +818,12 @@ func (c *config) GetenvWithDefault(key string, defaultValue string) string {
} }
func (c *config) IsEnvTrue(key string) bool { 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" return value == "1" || value == "y" || value == "yes" || value == "on" || value == "true"
} }
func (c *config) IsEnvFalse(key string) bool { 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" return value == "0" || value == "n" || value == "no" || value == "off" || value == "false"
} }