From 849b35a72ad85a0bdfdbbc478a6e7cbf962b71eb Mon Sep 17 00:00:00 2001 From: Norbert Wagner Date: Mon, 7 Nov 2022 12:07:59 +0100 Subject: [PATCH] do not quote result if it is a single value --- bin/cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cfg b/bin/cfg index 0ec463c..d4ffaab 100755 --- a/bin/cfg +++ b/bin/cfg @@ -219,7 +219,8 @@ if ($result instanceof Settings) $result = $result->toArray(); switch ($argv->find('action')) { case 'show': - echo json_encode($result, JSON_PRETTY_PRINT).PHP_EOL; + $out = (is_string($result)) ? $result : json_encode($result, JSON_PRETTY_PRINT); + echo $out.PHP_EOL; break; case 'write':