continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r661497 - in /continuum/trunk/continuum-core/src: main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
Date Thu, 29 May 2008 21:52:29 GMT
Author: carlos
Date: Thu May 29 14:52:28 2008
New Revision: 661497

URL: http://svn.apache.org/viewvc?rev=661497&view=rev
Log:
chroot arguments need to be quoted

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=661497&r1=661496&r2=661497&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Thu May 29 14:52:28 2008
@@ -258,12 +258,13 @@
                 sb.append( " " );
                 sb.append( new File( chrootJailDirectory, project.getGroupId() ) );
                 sb.append( " " );
-                sb.append( " /bin/sh -c cd " );
+                sb.append( " /bin/sh -c 'cd " );
                 sb.append( getRelativePath( chrootJailDirectory, workingDirectory, project.getGroupId()
) );
                 sb.append( " && " );
                 sb.append( actualExecutable );
                 sb.append( " " );
                 sb.append( arguments );
+                sb.append( "'" );
 
                 arguments = sb.toString();
                 actualExecutable = SUDO_EXECUTABLE;

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java?rev=661497&r1=661496&r2=661497&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
Thu May 29 14:52:28 2008
@@ -97,8 +97,8 @@
         final Map<String, String> environments = new HashMap<String, String>();
 
         final String cmd =
-            "chroot /home/xx " + " /bin/sh -c cd /dir1/dir2/workingdir/" + project.getId()
+ " && " + executable + " " +
-                arguments;
+            "chroot /home/xx " + " /bin/sh -c 'cd /dir1/dir2/workingdir/" + project.getId()
+ " && " + executable +
+                " " + arguments + "'";
 
         final ExecutionResult result = new ExecutionResult( 0 );
 



Mime
View raw message