You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/23 09:34:44 UTC

[GitHub] markusthoemmes commented on a change in pull request #3984: Simplify configuring OpenWhisk

markusthoemmes commented on a change in pull request #3984: Simplify configuring OpenWhisk
URL: https://github.com/apache/incubator-openwhisk/pull/3984#discussion_r212243292
 
 

 ##########
 File path: common/scala/transformEnvironment.sh
 ##########
 @@ -34,6 +34,12 @@ configVariables=$(compgen -v | grep $prefix)
 
 props=()
 
+if [ -n "$OPENWHISK_CONFIG" ]
+then
+   printf "%s" "$OPENWHISK_CONFIG" > "/openwhisk.conf"
+   props+=("-Dconfig.file='/openwhisk.conf'")
+fi
 
 Review comment:
   Can we generalize this a bit? As of now, this script is very non-OpenWhisk-dependent. What about:
   
   ```bash
   if [ -n "$CONFIGFILE_CONTENT" ]
   then
       location="/config.conf"
       echo "$CONFIGFILE_CONTENT" > "$location"
       props+=("-Dconfig.file='$location'")
   fi
   ```
   
   Note: I switched from `printf` to `echo`. Any reason to use `printf` here?
   Note 2: Please fix the indenting from 3 to 4 spaces.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services