ProcessEnv

1.0.1

Capture the shell environment of a Foundation app
ChimeHQ/ProcessEnv

What's New

v1.0.1

2025-05-03T18:05:26Z

What's Changed

  • Fix typo in Environment typealias by @adityadaniel in #3
  • Add proper escaping for command property

New Contributors

Full Changelog: 1.0.0...1.0.1

Build Status Platforms Documentation Matrix

ProcessEnv

ProcessEnv is a small library for capturing a user's shell configuration. This is very handy for launching Process instances with the same configuration. It also contains a few niceties for working with Process.

Integration

Swift Package Manager:

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

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

Contributing and Collaboration

I would love to hear from you! Issues or pull requests work great. Both a Matrix space and Discord are available for live help, but I have a strong bias towards answering in the form of documentation. You can also find me on the web.

I prefer collaboration, and would love to find ways to work together if you have a similar project.

I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace.

By participating in this project you agree to abide by the Contributor Code of Conduct.

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue May 27 2025 18:05:26 GMT-0900 (Hawaii-Aleutian Daylight Time)