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

Is it possible to set environment variables? #22

Closed
evancz opened this issue Jun 29, 2015 · 2 comments
Closed

Is it possible to set environment variables? #22

evancz opened this issue Jun 29, 2015 · 2 comments

Comments

@evancz
Copy link

evancz commented Jun 29, 2015

elm-reactor needs ELM_HOME, is that resolved? Can you point me to the relevant code if so?

We do different tricks with the mac and windows installers to do this. On mac we turn elm-reactor into a two part binary. The public one elm-reactor is just a thin wrapper that sets ELM_HOME to /usr/local/share/elm/ for the duration of the script and then calls elm-reactor-unwrapped which is the actual executable. This avoids any issues around "this shell sets variables like this, but that shell sets variables another way". Would that work here?

evancz pushed a commit to elm-lang/elm-reactor that referenced this issue Aug 13, 2015
This change starts using Template Haskell (TH) to bundle the necessary
compiled Elm code in the binary. This will mean we no longer need an
ELM_HOME and can avoid kevva/elm-bin#22
entirely.

This also introduces the cabal-build.py build script which touches the
TH file if any of the Elm resources have been modified since lasts we
compiled.

It also cleans up the new index code a decent amount. We took out all
the icons in favor of font-awesome which can again be bundled with the
binary instead of living in ELM_HOME.
@evancz
Copy link
Author

evancz commented Aug 13, 2015

This has been messing things for a lot of folks, so as we were doing some recent work on Elm Reactor, I decided to bundle the static resources in the binary itself so that no one needs ELM_HOME anymore. That should be out with the next release of the platform.

The root problem here is still pretty bad. We hear about this on the mailing list and various repos pretty often.

@rtfeldman
Copy link

This is done now on the elm-platform npm installer, and can be closed.

@evancz evancz closed this as completed Oct 29, 2015
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