git: 03abe3ac4077 - stable/14 - nuageinit: Standardize user-facing error messages
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Oct 2024 07:07:48 UTC
The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=03abe3ac4077101f30561fe8ca0b4007012bd63b commit 03abe3ac4077101f30561fe8ca0b4007012bd63b Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2024-07-30 01:59:16 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-10-08 07:04:01 +0000 nuageinit: Standardize user-facing error messages Signed-off-by: Jose Luis Duran <jlduran@gmail.com> (cherry picked from commit 38bb6f79e39a14ea99f559f59129a4cadf92b569) --- 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 }