Skip to content

Commit 1755f62

Browse files
committed
Handle missing .env/.env.local
1 parent 033ff13 commit 1755f62

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Unreleased
22

3-
## Added
4-
53
## Fixed
64

7-
## Changed
5+
- Handle missing `.env` or `.env.local`
86

97
# 0.5.33-alpha (2022-09-22 / c37380a)
108

@@ -44,4 +42,4 @@ Initial release
4442
- lambdaisland.classpath integration
4543
- Support for cider-nrepl, refactor-nrepl
4644
- Basic support for shadow-cljs cljs nREPL-base REPL
47-
- Auto-connect for Emacs
45+
- Auto-connect for Emacs

src/lambdaisland/launchpad/env.clj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,8 @@
8383

8484
(defn watch-handlers []
8585
(let [h (dotenv-watch-handler [".env" ".env.local"])]
86-
{".env" h
87-
".env.local" h}))
86+
(cond-> {}
87+
(exists? ".env")
88+
(assoc ".env" h)
89+
(exists? ".env.local")
90+
(assoc ".env.local" h))))

0 commit comments

Comments
 (0)