Skip to content

Commit 35ef1d1

Browse files
authored
error make initdb if xz isn't installed (#5872)
This threw me for a loop getting warehouse setup on my new laptop! `make initdb` was silently failing.
1 parent 21cdc96 commit 35ef1d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ ifneq ($(PR), false)
149149
endif
150150

151151
initdb:
152+
ifeq (, $(shell which xz))
153+
$(error "No xz available on PATH, install xz-utils!")
154+
endif
152155
docker-compose run --rm web psql -h db -d postgres -U postgres -c "DROP DATABASE IF EXISTS warehouse"
153156
docker-compose run --rm web psql -h db -d postgres -U postgres -c "CREATE DATABASE warehouse ENCODING 'UTF8'"
154157
xz -d -f -k dev/$(DB).sql.xz --stdout | docker-compose run --rm web psql -h db -d warehouse -U postgres -v ON_ERROR_STOP=1 -1 -f -

0 commit comments

Comments
 (0)