From e462821e469f0f81d56f11f3e8a1637d3b0e2291 Mon Sep 17 00:00:00 2001
From: Dennis Camera <dennis.camera@ssrq-sds-fds.ch>
Date: Mon, 14 Oct 2019 11:29:49 +0200
Subject: [PATCH] [__sensible_editor] Fix SC2028

---
 cdist/conf/type/__sensible_editor/explorer/editor_path | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdist/conf/type/__sensible_editor/explorer/editor_path b/cdist/conf/type/__sensible_editor/explorer/editor_path
index 8a5199c9..dcf63c9b 100644
--- a/cdist/conf/type/__sensible_editor/explorer/editor_path
+++ b/cdist/conf/type/__sensible_editor/explorer/editor_path
@@ -30,7 +30,7 @@ die() {
 editor_missing() { die "Editor '$1' is missing on the target system."; }
 editor_no_alternative() {
 	die "Editor '$1' is not in the alternatives list of the target system." \
-		"$(test "${editors}" && echo "\nPlease choose one of:\n\n${editors}")"
+		"$(test -n "${editors}" && printf '\nPlease choose one of:\n\n%s\n' "${editors}")"
 }
 
 # No need to check for the path if the file is supposed to be removed.