Swiftpack.co -  Package - ChimeHQ/ProcessEnv
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
ChimeHQ/ProcessEnv
Capture the shell environment of a Foundation app
.package(url: "https://github.com/ChimeHQ/ProcessEnv.git", from: "0.2")

Github CI Carthage compatible

ProcessEnv

ProcessEnv is a small library for capturing the shell configuration used by a Foundation/AppKit process. This is very handy for launching NSTask instances with the same configuration.

Integration

Carthage:

You can use Carthage to install this as a static library.

github "ChimeHQ/ProcessEnv"

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/ChimeHQ/ProcessEnv.git")
]

Extensions

The bulk of code is in the form of extensions on ProcessInfo, for accessing various environment variables. A single [String:String] dictionary of the user's environment is available as the userEnvironment property.

ProcessInfo.userEnvironment

Suggestions or Feedback

We'd love to hear from you! Get in touch via twitter, an issue, or a pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

GitHub

link
Stars: 5
Last commit: 4 weeks ago

Release Notes

v0.2
4 weeks ago

Fix a parsing issue with env output that contains "=" characters

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco