summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2020-06-18 13:58:19 -0400
committerJoey Hess2020-06-18 13:59:06 -0400
commit06aa1967c931cbe3e00848af59a76ceb7e07b0a8 (patch)
tree9b753db9752984c6fdb9722ac3697660b7c42d87 /src/Propellor
parentc4059b606f65185cf8d4a20e4badc099a63b569e (diff)
use cabal exec to find path of propellor binary
This turns out to be much faster than cabal install, which does unnecessary rebuilds and other work (https://github.com/haskell/cabal/issues/6919) This commit was sponsored by Jack Hill on Patreon.
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Bootstrap.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index 84a26ee3..d929c2cd 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -83,7 +83,7 @@ buildCommand bs = intercalate " && " (go (getBuilder bs))
, "cabal build -j1 propellor-config"
, intercalate "; "
[ "if [ -d dist-newstyle ]"
- , "then ln -sf $(find dist-newstyle/ -executable -type f | grep 'build/propellor-config/propellor-config$' | tail -n1) propellor"
+ , "then ln -sf $(cabal exec -- sh -c 'command -v propellor-config') propellor"
, "else ln -sf dist/build/propellor-config/propellor-config propellor"
, "fi"
]