Skip to content

Use /etc/profile.d to set PATH for dotnet tools - #1492

Merged
Álvaro Rausell Guiard (AlvaroRausell) merged 1 commit into
devcontainers:mainfrom
sliekens:dotnet_tools_path
Dec 8, 2025
Merged

Use /etc/profile.d to set PATH for dotnet tools#1492
Álvaro Rausell Guiard (AlvaroRausell) merged 1 commit into
devcontainers:mainfrom
sliekens:dotnet_tools_path

Conversation

@sliekens

Copy link
Copy Markdown
Contributor

Back in #628, I added ~/.dotnet/tools to the PATH using a relative path in containerEnv, so dotnet global tools would work regardless of the container user.

While this worked for running dotnet global tools, it broke compatibility with find -execdir, which treats relative paths in PATH as unsafe.

This PR removes the relative path from containerEnv and instead adds a script to /etc/profile.d that appends $HOME/.dotnet/tools to PATH for login shells. This preserves global tool functionality without compromising security.

@sliekens
Steven (sliekens) requested a review from a team as a code owner October 4, 2025 17:36

@Kaniska244 Kaniska (Kaniska244) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be further reviewed by maintainers

@sliekens

Copy link
Copy Markdown
Contributor Author

Kaniska (@Kaniska244) who is currently the maintainer / code owner for the dotnet feature?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, thanks for the contribution!

@AlvaroRausell
Álvaro Rausell Guiard (AlvaroRausell) merged commit f7cc77b into devcontainers:main Dec 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants