Skip to content

Commit

Permalink
readme: update path-type option (#41) (#42)
Browse files Browse the repository at this point in the history
* Expand the documentation: add all the possible values and what they do.
* Change the default path-type from 'strict' to 'minimal'.
  • Loading branch information
lazka authored and eine committed Jul 12, 2020
1 parent d845f34 commit 5c975f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Changed

- Change default of option `path-type` from `strict` to `minimal`.

## [v1.1.2](https://github.com/msys2/setup-msys2/compare/a4332eaf3b970340d6495b2076e1405ee48ea573...05abb8d585d071301cc19e6177945011875d9479)

### Added
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,19 @@ Furthermore, the environment variable can be overridden. This is useful when mul

#### path-type

By default, `MSYS2_PATH_TYPE` is set to `strict` by `msys2`. It is possible to override it either using an option or setting the environment variable explicitly:
Defines which parts of the Windows `$env:PATH` environment variable leak into the MSYS2 environment. Allowed values:

- `strict`: do not inherit anything from `$env:PATH`.
- `minimal` *(default)*: only inherit the default Windows paths from `$env:PATH` (so that `cmd.exe` and `powershell.exe` are available for example).
- `inherit`: inherit everything; warning: this can lead to interference with other tools installed on the system.

```yaml
- uses: msys2/setup-msys2@v1
with:
path-type: inherit
- run: msys2 <command>
path-type: minimal
```

```yaml
- uses: msys2/setup-msys2@v1
- run: msys2 <command>
env:
MSYS2_PATH_TYPE: inherit
```
This option corresponds to the `MSYS2_PATH_TYPE` setting in MSYS2; hence it can be set per step through `env`. See [msys2/MSYS2-packages: filesystem/profile](https://github.com/msys2/MSYS2-packages/blob/915946a637e1f2b7e26e32782f3af322009293db/filesystem/profile#L28-L45) for further details about the configuration of each option.

#### release

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
path-type:
description: 'Default value for MSYS2_PATH_TYPE environment variable: strict, inherit or minimal'
required: false
default: 'strict'
default: 'minimal'
release:
description: 'Retrieve and extract base installation from upstream GitHub Releases'
required: false
Expand Down

0 comments on commit 5c975f7

Please sign in to comment.