Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 2024 11:06:19 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 38bb6f79e39a - main - nuageinit: Standardize user-facing error messages
Message-ID:  <202409261106.48QB6Jqv063553@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=38bb6f79e39a14ea99f559f59129a4cadf92b569

commit 38bb6f79e39a14ea99f559f59129a4cadf92b569
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2024-07-30 01:59:16 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-09-26 10:59:24 +0000

    nuageinit: Standardize user-facing error messages
    
    Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
---
 libexec/nuageinit/nuageinit          | 2 +-
 libexec/nuageinit/tests/nuageinit.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit
index 8c289fea6b1d..c8f74d13b7fd 100755
--- a/libexec/nuageinit/nuageinit
+++ b/libexec/nuageinit/nuageinit
@@ -9,7 +9,7 @@ local ucl = require("ucl")
 local yaml = require("yaml")
 
 if #arg ~= 2 then
-	nuage.err("Usage " .. arg[0] .. " <cloud-init directory> [config-2|nocloud]", false)
+	nuage.err("Usage: " .. arg[0] .. " <cloud-init-directory> (<config-2> | <nocloud>)", false)
 end
 local path = arg[1]
 local citype = arg[2]
diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh
index f3fc55e87523..6b8ea7ff3328 100644
--- a/libexec/nuageinit/tests/nuageinit.sh
+++ b/libexec/nuageinit/tests/nuageinit.sh
@@ -19,9 +19,9 @@ atf_test_case config2_network_static_v4
 
 args_body()
 {
-	atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit <cloud-init directory> [config-2|nocloud]\n" /usr/libexec/nuageinit
-	atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit <cloud-init directory> [config-2|nocloud]\n" /usr/libexec/nuageinit bla
-	atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit <cloud-init directory> [config-2|nocloud]\n" /usr/libexec/nuageinit bla meh plop
+	atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit <cloud-init-directory> (<config-2> | <nocloud>)\n" /usr/libexec/nuageinit
+	atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit <cloud-init-directory> (<config-2> | <nocloud>)\n" /usr/libexec/nuageinit bla
+	atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit <cloud-init-directory> (<config-2> | <nocloud>)\n" /usr/libexec/nuageinit bla meh plop
 	atf_check -s exit:1 -e inline:"nuageinit: Unknown cloud init type: meh\n" /usr/libexec/nuageinit bla meh
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409261106.48QB6Jqv063553>