From 123e9eb05789033866cb34d5788060fe01017dcc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 27 Mar 2025 11:30:54 +0100 Subject: [PATCH] build(Makefile): fix shell and ghci targets for entrypoint --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e29a25460..456f8b7be 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ export SHELL=bash export CLEAN_DEPENDENCIES ?= false export CLEAN_IMAGES ?= false +export ENTRYPOINT ?= bash +export SRC + .PHONY: help # HELP: print out this help message help: @@ -79,11 +82,11 @@ start-%: .PHONY: shell-% # HELP(shell-$SERVICE): launch a (bash) shell inside a given service shell-%: - docker compose run --build --no-deps $* bash + docker compose run --build --no-deps --entrypoint="$(ENTRYPOINT)" $* .PHONY: ghci -# HELP: launch ghci -ghci: - docker compose run --build --no-deps backend stack ghci $(SRC) +# HELP: launch ghci instance. Use in combination with SRC to specify the modules to be loaded by ghci: make ghci SRC=src/SomeModule.hs +ghci: ENTRYPOINT=stack ghci $(SRC) +ghci: shell-backend ; .PHONY: stop # HELP: stop all services