the shell must be specified last
authorDon Armstrong <don@donarmstrong.com>
Tue, 27 Jun 2017 17:23:41 +0000 (10:23 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 27 Jun 2017 17:23:41 +0000 (10:23 -0700)
dqsub

diff --git a/dqsub b/dqsub
index 1058b91..c0696c1 100755 (executable)
--- a/dqsub
+++ b/dqsub
@@ -197,7 +197,7 @@ if ($options{interactive}) {
     if ($options{batch} eq 'pbs') {
         exec($JOB_SUBMITTER,@qsub_options);
     } else {
-        exec('srun',@qsub_options);
+        exec('srun',@qsub_options,$ENV{SHELL}//'bash');
     }
 
 } else {
@@ -301,7 +301,7 @@ sub generate_slurm_options{
         push @qo,'--mem='.$options{mem};
     }
     if ($options->{interactive}) {
-        push @qo,'--pty',$ENV{SHELL}//'bash';
+        push @qo,'--pty';
     }
     if ($options->{name}) {
         push @qo,'-J',$options->{name};