-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish-WikiContent
: Does not fail when push fails, for example invalid or expired token
#90
Labels
bug
The issue is a bug.
Comments
johlju
added
bug
The issue is a bug.
help wanted
The issue is up for grabs for anyone in the community.
labels
Jul 7, 2021
8 tasks
johlju
pushed a commit
that referenced
this issue
Aug 5, 2021
- Added private functions: - `Out-GitResult` - Displays `Invoke-Git` returned hashtable via Write-Verbose and Write-Debug localized messages. Fixes [Issue 90](#90) - `Hide-GitToken` - Used to redact the token from the specified git command so that the command can be safely outputted in logs. - `Publish-WikiContent` - Restored to original structure. - `Invoke-Git` - Added `-PassThru` switch to return result hashtable and not throw regardless of ExitCode value when used. - Throws when ExitCode -ne 0 and `-PassThru` switch not used. - Calls `Out-GitResult` when using `-Debug` or `-Verbose`.
johlju
removed
the
help wanted
The issue is up for grabs for anyone in the community.
label
Aug 5, 2021
With the fix in PR #96 this correctly fails now.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details of the scenario you tried and the problem that is occurring
When the content is published (pushed) to the GitHub repository Wiki git repository it never fails if there is an invalid or expired token.
Steps to reproduce the problem
Add a debug stage to the
azure-pipelines.yml
after the stageBuild
. This pipeline job set a fake token and starts the correct task.On the lines:
DscResource.DocGenerator/source/tasks/Publish_GitHub_Wiki_Content.build.ps1
Lines 197 to 198 in d79b424
Temporary hard-code to the real GitHub repository Wiki git repository repo:
Expected behavior
The task should fail if an error is encountered, especially when pushing to a repo with an invalid token.
Current behavior
Passes without any error. Below is pipeline output when running with the debug stage above.
Suggested solution to the issue
We should, at minimum, add error handling here:
DscResource.DocGenerator/source/Public/Publish-WikiContent.ps1
Lines 162 to 166 in d79b424
The operating system the target node is running
Ubuntu or Windows.
Version and build of PowerShell the target node is running
7.x
Version of the module that was used
v0.9.0-preview0009
The text was updated successfully, but these errors were encountered: