fix $? test for batch option
authorDon Armstrong <don@donarmstrong.com>
Wed, 8 Feb 2017 18:58:20 +0000 (10:58 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 8 Feb 2017 18:58:20 +0000 (10:58 -0800)
dqsub

diff --git a/dqsub b/dqsub
index 571bc28..d9963d3 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -157,7 +157,7 @@ if ($options{interactive} and @ARGV) {
 
 if (not defined $options{batch}) {
     qx/which sbatch/;
-    if ($?) {
+    if ($? == 0) {
         $options{batch} = 'slurm'
     } else {
        $options{batch} = 'pbs'