Created
February 27, 2026 12:10
-
-
Save maurges/ed5d60677d149e2b68bb4fd60324b4e1 to your computer and use it in GitHub Desktop.
Stack launcher that doesn't rebuild the world upon a sneeze of flags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| tests=false | |
| benches=false | |
| fast=false | |
| for arg in "$@"; do | |
| case "$arg" in | |
| --test|test) tests=true ;; | |
| --bench|bench) benches=true ;; | |
| --fast) fast=true ;; | |
| esac | |
| done | |
| workdir=".stack-work" | |
| ( $tests || $benches || $fast ) && workdir+="/target" | |
| $tests && workdir+="-test" | |
| $benches && workdir+="-bench" | |
| $fast && workdir+="-fast" | |
| stack --work-dir="$workdir" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment