Skip to content

Commit 937b8dd

Browse files
Update README with note on setting DOTNET_INSTALL_DIR for Linux permission issues (#689)
* update README: setting DOTNET_INSTALL_DIR * fix indentation
1 parent 2016bd2 commit 937b8dd

File tree

4 files changed

+158
-153
lines changed

4 files changed

+158
-153
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,13 @@ build:
314314
dotnet-version: '8.0.x'
315315
cache: true
316316
```
317+
You can also set `DOTNET_INSTALL_DIR` to a value based on runtime variables, such as `$HOME/.dotnet` or `${{ runner.temp }}/.dotnet` before the `setup-dotnet` step:
318+
319+
```yml
320+
- name: Set DOTNET_INSTALL_DIR
321+
run: echo "DOTNET_INSTALL_DIR=$HOME/.dotnet" >> $GITHUB_ENV
322+
```
323+
> **Note**: On some self-hosted or large Linux runners, installing .NET under the default `/usr/share/dotnet` location may fail due to insufficient permissions. To ensure successful installation, set `DOTNET_INSTALL_DIR` to a user-writable path.
317324

318325
## Recommended permissions
319326

0 commit comments

Comments
 (0)