Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap System.Posix.Env? #33

Open
Anrock opened this issue Nov 5, 2017 · 1 comment
Open

Wrap System.Posix.Env? #33

Anrock opened this issue Nov 5, 2017 · 1 comment

Comments

@Anrock
Copy link

Anrock commented Nov 5, 2017

Most of it can be implemented by plain reexport or simple wrapping of functions from System.Environment of base. Though base lower bound have to be bumped to 4.7 for setEnv.

@Anrock Anrock changed the title Wrap Sytem.Posix.Env? Wrap System.Posix.Env? Nov 5, 2017
@joeyh
Copy link
Contributor

joeyh commented Nov 14, 2017

I have some code in git-annex that does just that, http://source.git-annex.branchable.com/?p=source.git;a=blob;f=Utility/Env.hs;h=c56f4ec23c09f242eb5b17a77e1df82eea53250a;hb=HEAD -- feel free to reuse that.

Note there's a subtlety on Windows that setting an envvar to "" unsets it. So, setEnv var "" True >> getEnv var yields Nothing on Windows but Just "" on POSIX. I don't know of a way to avoid that difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants