Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #136 from Financial-Times/export-environment-varia…
Browse files Browse the repository at this point in the history
…bles

Export environment variables if a .env file is present.
  • Loading branch information
Adam Braimbridge authored Jan 26, 2017
2 parents 9cc1cd2 + 6985361 commit 0d9fd2c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Warning: Do not edit this file. Update it by running `make update-tools`.
# It's maintained on GitHub. Submit pull requests here: https://www.github.com/Financial-Times/n-makefile

# Export environment variables if a .env file is present.
ifneq ("$(wildcard .env)","")
sinclude .env
export $(shell [ -f .env ] && sed 's/=.*//' .env)
$(info Note — An .env file exists. Its contents have been exported as environment variables.)
endif

# ./node_modules/.bin on the PATH
export PATH := ./node_modules/.bin:$(PATH)

Expand Down

0 comments on commit 0d9fd2c

Please sign in to comment.