From 2505023387ea670fa12af1e9c69c503ac5681136 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Wed, 1 May 2019 12:31:30 +0200 Subject: [PATCH] Append requirement only if already not present --- cdist/emulator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cdist/emulator.py b/cdist/emulator.py index 5103f1a4..3cf82f84 100644 --- a/cdist/emulator.py +++ b/cdist/emulator.py @@ -319,7 +319,9 @@ class Emulator(object): lastcreatedtype) else: if 'require' in self.env: - self.env['require'] += " " + lastcreatedtype + appendix = " " + lastcreatedtype + if appendix not in self.env['require']: + self.env['require'] += appendix else: self.env['require'] = lastcreatedtype self.log.debug(("Injecting require for "