https://github.com/haroldadmin/pathfix
Fixes the PATH environment variable of the current process
https://github.com/haroldadmin/pathfix
go
Last synced: 28 days ago
JSON representation
Fixes the PATH environment variable of the current process
- Host: GitHub
- URL: https://github.com/haroldadmin/pathfix
- Owner: haroldadmin
- License: apache-2.0
- Created: 2020-07-02T07:09:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T18:38:37.000Z (almost 6 years ago)
- Last Synced: 2025-10-14T17:38:44.977Z (8 months ago)
- Topics: go
- Language: Go
- Homepage: https://pkg.go.dev/github.com/haroldadmin/pathfix
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pathfix
Package pathfix provides the ability to retrieve the PATH environment variable from the user's login shell and append its value to the PATH of the current process.
This is helpful when your Go program's binary is bundled in an application which is started from an OS's GUI. The GUI shell does not have access to the custom PATHs a user may have set in their terminal shell, which leads to problems when trying to find executables from the Go program. `pathfix` package helps solve this problem.
## Usage
The public API contains only one method.
```go
pathfix.Fix()
```
## Installation
Add this module to your project using `go get`:
```shell
go get github.com/haroldadmin/pathfix
```
## Contribution
Please report bugs and problems by opening issues. External contributions through PRs are also welcome.
## License
See [License](./LICENSE)