krisgeus / azdo-inline-script-shellcheck

Shellcheck for inline shell snippets
0 stars 0 forks source link

Invoke-analyzer module not available when running in pre-commit docker #14

Closed krisgeus closed 8 months ago

krisgeus commented 8 months ago
Invoke-ScriptAnalyzer: /bin/analyze-pwsh-snippet.ps1:12
Line |
  12 |  Invoke-ScriptAnalyzer -ScriptDefinition $pwsh_snippet -EnableExit -Re …
     |  ~~~~~~~~~~~~~~~~~~~~~
     | The term 'Invoke-ScriptAnalyzer' is not recognized as a name of a
     | cmdlet, function, script file, or executable program. Check the spelling
     | of the name, or if a path was included, verify that the path is correct
     | and try again.

Command running: docker run -v ${PWD}:/src:rw,Z --user $(id -u):$(id -g) --workdir /src [ghcr.io/krisgeus/inline-pwsh-check:latest](http://ghcr.io/krisgeus/inline-pwsh-check:latest) deploy.yml

When running without the --user it works correctly. I assume it is because the installed module is not available for all users somehow.

krisgeus commented 8 months ago

Install the module with "-Scope AllUsers"