SharpeRAD/Cake.Services

The escape character for the binPath is incorrect, causing the install to fail as it is executed via powershell

Closed this issue · 1 comments

If Arguments are supplied in the settings the binPath is setup with these arguments appended. A backslash is used to escape the quotes when adding the ExecutablePath, which is causing the command to fail during powershell execution.

If we trap the command and execute it from a dos prompt the command works as expected
image

Note the backslash in the command above i.e binPath= "\"C:/Projects/RainFin/RainFinBankingInterface/H2H/Source/Router/RainFin.H2H.Router.Processing.Service/bin/Release/NServiceBus.Host.exe\" -service"

But when run from powershell the command fails (sc just displays the help screen but the cake build does not fail).
image

The reason is that the you need to used the a backtick to escape characters in powershell or use the @""

Fixed in v0.2.9 👍