Skip to content
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

Fail action when module installation fails #95

Closed
BernieWhite opened this issue Jul 6, 2021 · 0 comments · Fixed by #99
Closed

Fail action when module installation fails #95

BernieWhite opened this issue Jul 6, 2021 · 0 comments · Fixed by #99
Labels
bug Something isn't working
Milestone

Comments

@BernieWhite
Copy link
Member

Description of the issue

If a module fails to install, an PowerShell error will be generated in output but this doesn't stop the pipeline.

If the module is not installed, included rules can not be run.

Expected behaviour

If any module fails to install, the action should error.

Failing to install a module could be a transient issue.

Error output

> Checking module: PSRule.Rules.MSFT.OSS
  - Installing module
Install-Package: /opt/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:9711
Line |
9711 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and
     | module name 'PSRule.Rules.MSFT.OSS'. Try Get-PSRepository to
     | see all available registered module repositories.

Get-Package: /opt/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:9445
Line |
9445 |          PackageManagement\Get-Package @PSBoundParameters | Microsoft. …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and
     | module names 'PSRule.Rules.MSFT.OSS'.

  - Failed to install

Action version:

  • Version: 1.5.0
@BernieWhite BernieWhite added the bug Something isn't working label Jul 6, 2021
BernieWhite added a commit to BernieWhite/ps-rule that referenced this issue Jul 22, 2021
@BernieWhite BernieWhite mentioned this issue Jul 22, 2021
4 tasks
@BernieWhite BernieWhite added this to the v1.6.0 milestone Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant