fix(scripts): use Flake by default if it exists

This commit is contained in:
Oliver Davies 2023-07-20 09:26:31 +01:00
parent 1b397749ca
commit dae27fdef8

View file

@ -4,6 +4,11 @@
set -euo pipefail
if [[ -f flake.nix ]]; then
nix develop -c "$SHELL"
exit 0
fi
if [[ -f docker-compose.yml ]]; then
docker compose up -d "${@}"
exit 0
@ -14,10 +19,5 @@ if [[ -f docker-compose.yaml ]]; then
exit 0
fi
if [[ -f flake.nix ]]; then
nix develop -c "$SHELL"
exit 0
fi
echo "No docker-compose.yaml or flake.nix file found."
exit 1