kichristensen / pwsh-mixin

Apache License 2.0
1 stars 1 forks source link

Powershell modules not installed for nonroot user #9

Closed Gozdew closed 1 month ago

Gozdew commented 1 month ago

The nonroot user, which porter executes the invocation image as, does not get the modules installed (can't do Import-Module). They are installed for the root user. If the modules are installed using the -Scope AllUsers they are available.

Related code (output to Dockerfile): https://github.com/kichristensen/pwsh-mixin/blob/54dbf7ee55ad7fca8e631bc8415b5c239f0e03fb/pkg/pwsh/build.go#L66 https://github.com/kichristensen/pwsh-mixin/blob/54dbf7ee55ad7fca8e631bc8415b5c239f0e03fb/pkg/pwsh/build.go#L68

(Also update related tests' expected outputs.)

kichristensen commented 1 month ago

@Gozdew thanks for reporting this. Would you be willing to make a PR with the changes? Otherwise I will happily do it

Gozdew commented 1 month ago

Attempting my first github pull request :)

kichristensen commented 1 month ago

@Gozdew It looked good to me, thank you very much. I will cut a new release tomorrow

Gozdew commented 1 month ago

Thank you :)