|
From: Jason B. <br...@us...> - 2004-11-16 19:22:25
|
Update of /cvsroot/openxcat/openxcat/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6678 Modified Files: psh Log Message: Useful error if you use one arg that isn't a valid noderange Index: psh =================================================================== RCS file: /cvsroot/openxcat/openxcat/bin/psh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- psh 16 Nov 2004 17:29:18 -0000 1.7 +++ psh 16 Nov 2004 19:22:15 -0000 1.8 @@ -161,6 +161,10 @@ } else { @nodes = noderange($noderange); } + if ( ! scalar(@nodes) ) { + croak "No nodes available in range $noderange"; + } + print "Executing on: @nodes \n"; use Cwd; my $cwd = cwd(); @@ -191,6 +195,9 @@ } else { @nodes = noderange($noderange); } + if ( ! scalar(@nodes) ) { + croak "No nodes available in range $noderange"; + } print "Executing on: @nodes\n"; } if ( $command =~ /^cd (.*)$/ ) { |