yvlf / xinc

Automatically exported from code.google.com/p/xinc
0 stars 0 forks source link

Documentation Task Escape Issues #226

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up a project as usual
2. Include a documentation task in the publishers
3. Build the Project

What is the expected output? What do you see instead?
The documentation should be generated and accessible throught the web interface 
instead I get an error:
[build] project-name: /documentation/destination/folder, result : FAILURE

What version of the product are you using? On what operating system?
Xinc 2.1 on CentOS 5.8

Please provide any additional information below.
I solved this issue by removing the quotes around the targetDir variable:
exec('cp  -Rf ' . escapeshellarg($sourceFile) . '/* "' . 
escapeshellarg($targetDir) . '"', $out, $res1);

TO

exec('cp  -Rf ' . escapeshellarg($sourceFile) . '/* ' . 
escapeshellarg($targetDir), $out, $res1);

Otherwise the targetDir would be something like:

"\'/documentation/destination/folder\'"

Original issue reported on code.google.com by tiagoafs...@gmail.com on 27 Apr 2012 at 10:00

GoogleCodeExporter commented 9 years ago
Ahh missed the quotes while fixxing Issue 198.

fixed in svn the line to:

exec('cp  -Rf ' . escapeshellarg($sourceFile . '/*') . ' ' . 
escapeshellarg($targetDir), $out, $res1);

Can you please try and report if it works? As I haven't such a setup yet handy.

Also fixed the Windows XCopy line.

Original comment by opitz.al...@googlemail.com on 27 Apr 2012 at 10:42

GoogleCodeExporter commented 9 years ago
Sorry, I have been dealing with some other issues so I haven't been able to 
test it. As soon as I get a chance I'll test it.

Original comment by tiagoafs...@gmail.com on 28 Apr 2012 at 2:47

GoogleCodeExporter commented 9 years ago
I have just tested as per your instructions and it didn't work:
cp: cannot stat `/var/xinc/projects/project/doc/dir/*': No such file or 
directory

This seemed a bit odd IMHO so I tested again with my correction and it worked. 
I see no major difference here and no reason why it should not work but the 
fact is... it doesn't!

Original comment by tiagoafs...@gmail.com on 28 Apr 2012 at 4:55

GoogleCodeExporter commented 9 years ago
Can you post your config please?

Original comment by opitz.al...@googlemail.com on 28 Apr 2012 at 7:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here it is

Original comment by tiagoafs...@gmail.com on 29 Apr 2012 at 9:26

Attachments:

GoogleCodeExporter commented 9 years ago
So, excuse my delay but I got my sweet baby Helena. :-D

So, I changed the line from

exec('cp  -Rf ' . escapeshellarg($sourceFile . '/*') . ' ' . 
escapeshellarg($targetDir), $out, $res1);

into

exec('cp  -Rf ' . escapeshellarg($sourceFile) . ' ' . 
escapeshellarg($targetDir), $out, $res1);

Removing the string part after $sourceFile and it worked for my example. Hope 
that helps.

Original comment by opitz.al...@googlemail.com on 8 May 2012 at 6:56

GoogleCodeExporter commented 9 years ago
Is in SVN

Original comment by opitz.al...@googlemail.com on 17 May 2012 at 10:33