From cdfca514fc3d6c11205c5559c203fed19b46c6ed Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2020 12:30:10 +0100 Subject: [PATCH] chore: execute yesod via stack if yesod is not in PATH --- start.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 07cf5940a..54bfd2d0e 100755 --- a/start.sh +++ b/start.sh @@ -25,6 +25,12 @@ if [[ -d .stack-work-run ]]; then trap move-back EXIT fi -# stack exec -- yesod devel $@ - -yesod devel $@ +if ! [ -z "$(which yesod)" ] +then + yesod devel $@ +elif ! [ -z "$(which stack)" ] +then + stack exec -- yesod devel $@ +else + exit 1 +fi