ProcessEnv

0.3.0

Capture the shell environment of a Foundation app
ChimeHQ/ProcessEnv

What's New

v0.3.0

2022-03-10T21:00:36Z
  • Process.ExecutionParameters
  • Process.execute
  • Process.executeAsUser

Build Status License Platforms

ProcessEnv

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

Integration

Swift Package Manager:

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

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.processInfo.userEnvironment

ProcessInfo.processInfo.path // $PATH
ProcessInfo.processInfo.homePath
ProcessInfo.processInfo.shellExecutablePath

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.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun May 01 2022 17:14:20 GMT-0500 (GMT-05:00)