Skip to content

(GH119) add $psake.error_message#259

Merged
devblackops merged 1 commit intopsake:masterfrom
sideproject:error_message
Aug 28, 2018
Merged

(GH119) add $psake.error_message#259
devblackops merged 1 commit intopsake:masterfrom
sideproject:error_message

Conversation

@sideproject
Copy link
Copy Markdown

Adding $psake.error_message per #119

Related Issue

#119

How Has This Been Tested?

Added $psake.error_messge pester check to current tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@devblackops devblackops self-requested a review August 28, 2018 03:28
@devblackops devblackops merged commit 636439b into psake:master Aug 28, 2018
Copy link
Copy Markdown
Member

@devblackops devblackops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidalpert
Copy link
Copy Markdown
Contributor

@sideproject thank you so much for this. I was wracking my brain trying to figure out how to capture this output in a TaskTearDown block and this did the trick. nice work. 👏

@davidalpert
Copy link
Copy Markdown
Contributor

davidalpert commented Mar 20, 2019

except actually I'm seeing odd behavior where the $psake.error_message appears to be holding the value it held in the previous run... 🤔

like $psake.build_succeeded and $psake.error_message are only updated after the TaskTearDown runs....

@davidalpert
Copy link
Copy Markdown
Contributor

davidalpert commented Mar 20, 2019

😞 it appears that TaskTearDown completes in the finally block of Invoke-Task before $psake.build_succeeded and $error_message are set in Invoke-Psake so doesn't have reliable access to those variables from the current invocation or any way to know if the task it is tearing down has failed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants