unetd: cli: fix error reporting in the apply command
authorFelix Fietkau <nbd@nbd.name>
Fri, 6 Jun 2025 08:42:57 +0000 (10:42 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 22 Oct 2025 09:06:36 +0000 (11:06 +0200)
Pass errors during config signing to the user

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/unetd/files/unet.uc

index 44d1c83e5db23871c5495eff241a3fb967acdefa..453c58adb0ff0a2b7c07ea0275fbeeac29430c4f 100644 (file)
@@ -1279,8 +1279,11 @@ let UnetEdit = {
                        if (network_apply(ctx, argv, named))
                                changed = true;
 
-                       if (!changed)
+                       if (!changed) {
+                               if (length(ctx.result.errors) > 0)
+                                       return;
                                return ctx.ok("No changes");
+                       }
 
                        return ctx.ok("Changes applied");
                }