Forcing exit code of Invoke-PSake to the build status. Resolution to bug #23 #24

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

Exit with the return code of build_success forces the return code to 0 if the build was successful, non-zero if unsuccessful.

toddhgardner added some commits Nov 4, 2011

@toddhgardner toddhgardner Exit with the return code of build_success forces the return code to …
…0 if the build was successful, non-zero if unsuccessful.
5831490
@toddhgardner toddhgardner Added textcolor parameter to invoke-psake to change the color that ta…
…sk titles print in. Allows for better visibility on dark consoles.
145232c
Member

whut commented Nov 4, 2011

Thanks for spotting that bug! Fixed in commit e17c6dd, but in a different way.

Invoke-Psake should never exit and set exit code, because that would exit whole powershell process (Invoke-Psake is not process, is a function called inside powershell process). After calling Invoke-Psake check $psake.build_success variable, something like that was recenlty added to psake.cmd, and now I updated it to fix your bug.

Member

whut commented Nov 4, 2011

I can't accept your other commit, it's incomplete. If you wan't ability to change colors used for psake make it configurable for all colors used by psake (currently blue - info, yellow - warning, red - error, green - success), not only for blue, probably as settings in psake-config.ps1.

But right, blue is not very visible on darker consoles, so I changed it to Cyan in 9d8903c. This color is used by msbuild, and is commonly recomended, for example here. I hope it will work for you.

whut closed this Nov 4, 2011

Awesome dude; thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment