Skip to content

Is it possible to register modules with "dotnet tool" too and run them with dotnet tool run ps-rule run? #1857

Answered by BernieWhite
veikkoeeva asked this question in Q&A
Discussion options

You must be logged in to vote

Absolutely. Keeping in the flow is where we want to go. I think the Find-Module exception is probably a bug relating to some missing dependencies. But you should be able to run that command dotnet tool run ps-rule module add PSRule.Rules.Azure to add the module into the lock file then run dotnet tool run ps-rule run to execute analysis.

The lock file specifically deals with pinning and automatically installation of modules which you could not do easily in previous versions.

However, regardless of the lock file you can use the ps-rule.yaml to configure required modules that will be loaded and installed.

include:
  module:
  - PSRule.Rules.Azure

Then dotnet tool run ps-rule module restore and

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@BernieWhite
Comment options

Answer selected by veikkoeeva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants