openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrutkow...@apache.org
Subject [incubator-openwhisk-wskdeploy] branch master updated: Print warning msg when env var is empty (#419)
Date Thu, 31 Aug 2017 14:44:44 GMT
This is an automated email from the ASF dual-hosted git repository.

mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 5541d55  Print warning msg when env var is empty (#419)
5541d55 is described below

commit 5541d55de52885c983221d0b62131611c026c33f
Author: Ying Chun Guo <guoyingc@cn.ibm.com>
AuthorDate: Thu Aug 31 22:44:42 2017 +0800

    Print warning msg when env var is empty (#419)
---
 tests/usecases/triggerrule/manifest.yml | 2 +-
 utils/misc.go                           | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/usecases/triggerrule/manifest.yml b/tests/usecases/triggerrule/manifest.yml
index 6c3ab3d..43615f2 100644
--- a/tests/usecases/triggerrule/manifest.yml
+++ b/tests/usecases/triggerrule/manifest.yml
@@ -1,5 +1,5 @@
 package:
-  name: helloworld
+  name: triggerrule
   version: 1.0
   license: Apache-2.0
   actions:
diff --git a/utils/misc.go b/utils/misc.go
index eca40fe..91a2f72 100644
--- a/utils/misc.go
+++ b/utils/misc.go
@@ -159,8 +159,9 @@ func GetEnvVar(key interface{}) interface{} {
 			envkey := strings.Split(key.(string), "$")[1]
 			value := os.Getenv(envkey)
 			if value == "" {
-				// TODO() We should issue a warning to the user (verbose) that env. var. was not found
+				// Issue a warning to the user (verbose) that env. var. was not found
 				// (i.e., and empty string was returned).
+				fmt.Println("WARNING: Missing Environment Variable "+envkey+".")
 			}
 			return value
 		}

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].

Mime
View raw message