path: root/src
diff options
authorJoey Hess2019-08-08 11:35:10 -0400
committerJoey Hess2019-08-08 11:35:18 -0400
commit1eae61a72a4b4636326d042cdf66d7cb94c7e708 (patch)
treeb44ecc029fcdce4118d71132c001174001ff1256 /src
parent0bef6af55fb8318660cdaf1e7e32208d93b6c7c6 (diff)
Localdir.hasOriginUrl: Depend on Git.installed.
* Localdir.hasOriginUrl: Depend on Git.installed. * Localdir.hasOriginUrl: Type changed from UnixLike to DebianLike because Git.installed is not implemented for other unixes. (API change) This commit was sponsored by Denis Dzyubenko on Patreon.
Diffstat (limited to 'src')
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Propellor/Property/Localdir.hs b/src/Propellor/Property/Localdir.hs
index 2323f569..69d9af74 100644
--- a/src/Propellor/Property/Localdir.hs
+++ b/src/Propellor/Property/Localdir.hs
@@ -9,6 +9,7 @@ import Propellor.Git.Config
import Propellor.Types.Info
import Propellor.Types.Container
import Propellor.Property.Mount (partialBindMountsOf, umountLazy)
+import qualified Propellor.Property.Git as Git
-- | Sets the url to use as the origin of propellor's git repository.
@@ -19,8 +20,10 @@ import Propellor.Property.Mount (partialBindMountsOf, umountLazy)
-- When hosts are being updated without using -- --spin, eg when using
-- the `Propellor.Property.Cron.runPropellor` cron job, this property can
-- be set to redirect them to a new git repository url.
-hasOriginUrl :: String -> Property (HasInfo + UnixLike)
-hasOriginUrl u = setInfoProperty p (toInfo (InfoVal (OriginUrl u)))
+hasOriginUrl :: String -> Property (HasInfo + DebianLike)
+hasOriginUrl u =
+ setInfoProperty p (toInfo (InfoVal (OriginUrl u)))
+ `requires` Git.installed
p :: Property UnixLike
p = property ("propellor repo url " ++ u) $ do