You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/09/18 14:55:31 UTC
[incubator-openwhisk-cli] 03/16: Clarify WSK_CONFIG_FILE empty
string behavior (#2357)
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
commit 326ffdbcceafd685067e2b1613237349c644d6ef
Author: Mark Deuser <md...@us.ibm.com>
AuthorDate: Thu Sep 14 12:37:21 2017 -0400
Clarify WSK_CONFIG_FILE empty string behavior (#2357)
- add test and add comments.
---
commands/property.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/commands/property.go b/commands/property.go
index d3476fd..d51fdeb 100644
--- a/commands/property.go
+++ b/commands/property.go
@@ -402,8 +402,11 @@ func SetDefaultProperties() {
func GetPropertiesFilePath() (propsFilePath string, werr error) {
var envExists bool
- // Environment variable overrides the default properties file path
- if propsFilePath, envExists = os.LookupEnv("WSK_CONFIG_FILE"); envExists == true || propsFilePath != "" {
+ // WSK_CONFIG_FILE environment variable overrides the default properties file path
+ // NOTE: If this variable is set to an empty string or non-existent/unreadable file
+ // - any existing $HOME/.wskprops is ignored
+ // - a default configuration is used
+ if propsFilePath, envExists = os.LookupEnv("WSK_CONFIG_FILE"); envExists {
whisk.Debug(whisk.DbgInfo, "Using properties file '%s' from WSK_CONFIG_FILE environment variable\n", propsFilePath)
return propsFilePath, nil
} else {
--
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.