dotnet / dotnet/sdk

`dotnetup` full replacement mode on Mac should set other configuration for GUI apps

Open
#54,803 1 comment 0 reactions 0 assignees View on GitHub
Area-dotnetup untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

The issue with mac is that env vars set in the terminal don't impact applications launched through the GUI (e.g. the dock) unless they are also added in special root owned locations.

In full replacement mode on Mac, we should likely also set the environment variables for `DOTNET_ROOT` and perhaps append to `PATH` in `/etc/launchd.conf`.

We could also consider writing the entry within `paths.d` like the `pkg` installer does, however we'd need to consider if that causes a 'break' or not. However, both of those require elevation so dotnetup would need to be elevated/run under sudo.

For apps like VS Code, we should consider how 'terminal' mode may be confusing to users when it does not get picked up via vscode when launched from the Dock.

### dotnetup version

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.