git: a6ecbf2b3585 - main - nuageinit: improve debugging when mkdir fails

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 20 Aug 2024 10:12:08 UTC
The branch main has been updated by bapt:

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

commit a6ecbf2b35856e312d1e826b206142b9f930a760
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-08-20 10:05:25 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-08-20 10:09:43 +0000

    nuageinit: improve debugging when mkdir fails
---
 libexec/nuageinit/nuage.lua | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index cca1fe9b4678..116ab143ccfa 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -188,10 +188,7 @@ local function addsshkey(homedir, key)
 		chownak = true
 		dirattrs = lfs.attributes(dotssh_path)
 		if dirattrs == nil then
-			if not lfs.mkdir(dotssh_path) then
-				warnmsg("nuageinit: impossible to create ".. dotssh_path)
-				return
-			end
+			assert(lfs.mkdir(dotssh_path))
 			chowndotssh = true
 			dirattrs = lfs.attributes(homedir)
 		end