[swift-build-dev] NSGetEnviron and PR#400
ankit at ankit.im
Fri Jun 10 07:22:35 CDT 2016
There is no native method in swift to get the environment list right now
but you can use Foundation's NSProcessInfo
If you want an example:
On Fri, Jun 10, 2016 at 2:49 PM, Yannick Heinrich via swift-build-dev <
swift-build-dev at swift.org> wrote:
> I initiated the PR #400 in the package manager and I’m trying to implement
> the last suggestion in this thread.
> This is to recopy the current environment variables for git clone instead
> of cherry-pick several specifics one.
> I would like to use the _NSGetEnviron variable that should be defined in
> Darwin but I don’t manage to reference it.
> I tried:
> return environ
> return Darwin.environ
> return libc.environ
> I’m using the DEVELOPMENT-SNAPSHOT-2016-05-09-a toolchain.
> Any tips on how to call this method from Swift ?
> swift-build-dev mailing list
> swift-build-dev at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-build-dev