From 5cfb20668421acb3c0de133afe973fc693b8b320 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 5 Dec 2015 18:03:02 -0400 Subject: remove trivial --- doc/writing_properties.mdwn | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'doc/writing_properties.mdwn') diff --git a/doc/writing_properties.mdwn b/doc/writing_properties.mdwn index 9a700ac3..2209026f 100644 --- a/doc/writing_properties.mdwn +++ b/doc/writing_properties.mdwn @@ -53,13 +53,12 @@ run: The only remaining problem with this is that shellSetTo runs chsh every time, and propellor will always display that it's made a change each time it runs, even when it didn't really do much. Now, there's an easy way to -avoid that problem, we could just tell propellor that it's a trivial -property, and then it will run chsh every time and not think it made any -change: +avoid that problem, we could just tell propellor to assume that chsh +has not made a change: shellSetTo :: UserName -> FilePath -> Property - shellSetTo user shell = trivial $ - cmdProperty "chsh" ["--shell", shell, user] + shellSetTo user shell = cmdProperty "chsh" ["--shell", shell, user] + `assume` NoChange But, it's not much harder to do this right. Let's make the property check if the user's shell is already set to the desired value and avoid -- cgit v1.3-2-g0d8e