ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fba...@apache.org
Subject ambari git commit: AMBARI-11673 [WinTP2] ambari-server setup --jdbc-driver displays bogus error
Date Thu, 04 Jun 2015 01:10:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk aeccbc7fe -> cb2a69aa4


AMBARI-11673 [WinTP2] ambari-server setup --jdbc-driver displays bogus error

+Fixed arguments with spaces in Powershell


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cb2a69aa
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cb2a69aa
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cb2a69aa

Branch: refs/heads/trunk
Commit: cb2a69aa4de160a6fb946a34ee0b2d048827a1c5
Parents: aeccbc7
Author: Florian Barca <fbarca@hortonworks.com>
Authored: Wed Jun 3 18:10:49 2015 -0700
Committer: Florian Barca <fbarca@hortonworks.com>
Committed: Wed Jun 3 18:10:49 2015 -0700

----------------------------------------------------------------------
 ambari-agent/conf/windows/ambari-agent.ps1       | 14 ++++++++++++++
 ambari-server/src/main/windows/ambari-server.ps1 | 14 ++++++++++++++
 2 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cb2a69aa/ambari-agent/conf/windows/ambari-agent.ps1
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/windows/ambari-agent.ps1 b/ambari-agent/conf/windows/ambari-agent.ps1
index 6958523..f3a6910 100644
--- a/ambari-agent/conf/windows/ambari-agent.ps1
+++ b/ambari-agent/conf/windows/ambari-agent.ps1
@@ -30,6 +30,20 @@ switch ($($args[0])){
   }
 }
 
+# Handle spaces in command line arguments properly
+$quoted_args=@()
+
+ForEach ($arg in $args)
+{
+  if($arg.Contains(' '))
+  {
+    $arg = """" + $arg + """"
+  }
+  $quoted_args = $quoted_args + @($arg)
+}
+
+$args = $quoted_args
+
 $AMBARI_AGENT="ambari-agent"
 $AMBARI_SVC_NAME = "Ambari Agent"
 $current_directory = (Get-Item -Path ".\" -Verbose).FullName

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb2a69aa/ambari-server/src/main/windows/ambari-server.ps1
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/windows/ambari-server.ps1 b/ambari-server/src/main/windows/ambari-server.ps1
index 690b1a9..e50ff26 100644
--- a/ambari-server/src/main/windows/ambari-server.ps1
+++ b/ambari-server/src/main/windows/ambari-server.ps1
@@ -30,6 +30,20 @@ switch ($($args[0])){
   }
 }
 
+# Handle spaces in command line arguments properly
+$quoted_args=@()
+
+ForEach ($arg in $args)
+{
+  if($arg.Contains(' '))
+  {
+    $arg = """" + $arg + """"
+  }
+  $quoted_args = $quoted_args + @($arg)
+}
+
+$args = $quoted_args
+
 $AMBARI_SERVER="ambari-server"
 $AMBARI_SVC_NAME = "Ambari Server"
 $current_directory = (Get-Item -Path ".\" -Verbose).FullName


Mime
View raw message