dancer does not return non-zero exit code on bad application name #919

Closed
ppisar opened this Issue May 7, 2013 · 2 comments

Comments

Projects
None yet
2 participants

ppisar commented May 7, 2013

$ dancer --no-check --application "Foo-Bar" 
Error: Invalid application name.
Application names must not contain single colons, dots, hyphens or start with a number.
$ echo $?
0

ppisar commented May 7, 2013

This patch fixes it:

From 2cd69b0b5b1e31fcaa0306844c61bffb24a7253a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 7 May 2013 15:44:52 +0200
Subject: [PATCH] Return non-zero exit code on bad application name

---
 script/dancer | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/dancer b/script/dancer
index eb63000..1561315 100755
--- a/script/dancer
+++ b/script/dancer
@@ -80,7 +80,7 @@ sub validate_app_name {
         print STDERR "Error: Invalid application name.\n";
         print STDERR "Application names must not contain single colons,"
             ." dots, hyphens or start with a number.\n";
-        exit;
+        exit 1;
     }
 }

-- 
1.8.1.4

@yanick yanick closed this in d505ee3 May 13, 2013

Contributor

yanick commented May 13, 2013

patch merged (with the difference that the script will have an exit code of 255, not 1) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment