CB-13145: added variable replacing to framework tag
authorSteve Gill <stevengill97@gmail.com>
Fri, 18 Aug 2017 00:18:12 +0000 (17:18 -0700)
committerAudrey So <audreyso@apache.org>
Mon, 25 Sep 2017 17:49:40 +0000 (10:49 -0700)
src/PluginInfo/PluginInfo.js

index 4d77cbc..ae003c9 100644 (file)
@@ -312,6 +312,12 @@ function PluginInfo (dirname) {
             var src = el.attrib.src;
             if (options) {
                 var vars = options.cli_variables || {};
+
+                if (Object.keys(vars).length === 0) {
+                    // get variable defaults from plugin.xml for removal
+                    vars = self.getPreferences(platform);
+                }
+                
                 var regExp;
                 // Iterate over plugin variables.
                 // Replace them in framework src if they exist