ソースを参照

Fix issue where error message is printed twice in testrail-report

George S. Baugh 11 年 前
コミット
f8a6b7d853
1 ファイル変更8 行追加2 行削除
  1. 8 2
      bin/testrail-report

+ 8 - 2
bin/testrail-report

@@ -203,8 +203,14 @@ if ($file) {
     close($fh);
 } else {
     #Just read STDIN, print help if no file was passed
-    if (IO::Interactive::Tiny::is_interactive()) { print "ERROR: no file passed, and no data piped in! See --help for usage." }
-    if ( !$run || !$apiurl || !$password || !$user || !$project ) { print "ERROR: Interactive mode not allowed when piping input.  See --help for options.\n"; exit 0;};
+    if (IO::Interactive::Tiny::is_interactive()) {
+        print "ERROR: no file passed, and no data piped in! See --help for usage.";
+        exit(1);
+    }
+    if ( !$run || !$apiurl || !$password || !$user || !$project ) {
+        print "ERROR: Interactive mode not allowed when piping input.  See --help for options.\n";
+        exit(1);
+    }
     while (<>) {
         $_ = colorstrip($_); #strip prove brain damage
         s/^\s*//g; #Fix prove brain damage