oasp / oasp4j-ide

tool to automate setup and update of development environment (for Java projects)
Apache License 2.0
14 stars 15 forks source link

oomph msiexec broken for paths with whitespaces #117

Closed maybeec closed 7 years ago

maybeec commented 7 years ago
Performing Resource Copy https://nodejs.org/dist/v6.9.1/node-v6.9.1-x64.msi --> file:/I:/eclipse/Neuer%20Ordner%20(2)/temp/nodejs.msi
Copying resource https://nodejs.org/dist/v6.9.1/node-v6.9.1-x64.msi to file:/I:/eclipse/Neuer%20Ordner%20(2)/temp/nodejs.msi
Performing cli mkdir.nodejs.folder
Operating on windows 10
Execute: mkdir I:\eclipse\Neuer Ordner (2)\software\nodejs @ I:\eclipse\Neuer Ordner (2)
Performing cli install.nodejs
Execute: msiexec /a "I:\\eclipse\\Neuer Ordner (2)\\temp\\nodejs.msi" /qn TARGETDIR="I:\\eclipse\\Neuer Ordner (2)\\software\\nodejs\\" /log "I:\\eclipse\\Neuer Ordner (2)\\temp\\log_node.log" @ I:\eclipse\Neuer Ordner (2)
Performing cli install.nodejs.cleanup.msi
Execute: del "I:\eclipse\Neuer Ordner (2)\software\nodejs\nodejs.msi" @ I:\eclipse\Neuer Ordner (2)
I:\eclipse\Neuer Ordner (2)\software\nodejs\nodejs.msi konnte nicht gefunden werden

Basically, the parameter value behind /Log is the problem. I investigated a little further and finally found that the parameter value has to be quoted double:

http://stackoverflow.com/questions/18833536/how-to-handle-spaces-in-path-of-log-file https://issues.jenkins-ci.org/browse/JENKINS-19447 https://github.com/jenkinsci/jenkins/pull/946/commits/4f6e649294e27feb3afc870d0ca959e771ff9778

themetalone commented 7 years ago

Since I have absolutely no idea how to fix this I'm evaluating a work around right now.

The CLI-Task is able to start in a given directory, like the oasp4j-root. Currently we use absolute paths that can contain white spaces. Although, the oasp4j-ide folder structure is white space free. I plan on running the CLI-Task in the oasp4j root and referencing the destinations relative to the root and thus removing any white space from the used paths.

themetalone commented 7 years ago

Problem with my last idea is that TARGETDIR cannot handle relative paths. But I found a workaround that seems to work (but still needs to be tested and commited).

I created an helper script that resolves a relative path via the windows cmd tools. This approach seems to do it