Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit d28b684

Browse files
author
Andrew Menagarishvili
committed
Added docs about WIRINGPI_CODES environment variable
1 parent 329928f commit d28b684

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ a pin based GPIO access library written in C.
6060
You can grab the latest version of PowerShell IoT by running:
6161

6262
```powershell
63-
sudo pwsh
63+
sudo WIRINGPI_CODES=1 pwsh
6464
Install-Module Microsoft.PowerShell.IoT
6565
```
6666

@@ -133,9 +133,14 @@ _NOTE: If you'd rather not use the script, simply copy the `out/Microsoft.PowerS
133133
First, you must run pwsh with sudo:
134134

135135
```powershell
136-
sudo pwsh
136+
sudo WIRINGPI_CODES=1 pwsh
137137
```
138138

139+
##### About `WIRINGPI_CODES` environment variable
140+
141+
`Microsoft.PowerShell.IoT` module internally uses [WiringPi library](http://wiringpi.com/reference/setup) which has a default behavior of terminating current process (in this case - PowerShell) even on non-critical errors in setup functions.
142+
To avoid such crashes define `WIRINGPI_CODES` environment variable either when starting PowerShell (see example above) or through configuration scripts - example for an interactive login shell - `echo "export WIRINGPI_CODES=1"|sudo tee -a /etc/profile.d/WiringPiCodes.sh`
143+
139144
If you have the `Microsoft.PowerShell.IoT` module in your PSModulePath:
140145

141146
```powershell

0 commit comments

Comments
 (0)