X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FClearcase.pm;h=a8451842fdb8d7436721bf82d5f94a858e371c05;hb=6cf0d2cda8a454c46c0cd44fc2edd2093cd8c83a;hp=651d33c1420add5c8fca4a9d51eec0784b7603aa;hpb=d895bcfa1f515422ffde513f7fbe55a728d9c85c;p=clearscm.git diff --git a/lib/Clearcase.pm b/lib/Clearcase.pm index 651d33c..a845184 100644 --- a/lib/Clearcase.pm +++ b/lib/Clearcase.pm @@ -80,7 +80,7 @@ use IPC::Open3; use OSDep; use Display; -my ($clearpid, $clearin, $clearout, $oldHandler); +my ($clearpid, $clearin, $clearout, $oldHandler, $cleartool); our $VIEW_DRIVE = 'M'; our $VOB_MOUNT = 'vob'; @@ -578,13 +578,13 @@ Array of output lines from the cleartool command execution. # installed under /opt/rational/clearcase/bin. This is needed in case we wish # to use these Clearcase objects say in a web page where the server is often # run as a plain user who does not have cleartool in their path. - my $cleartool; - - if ($ARCHITECTURE =~ /Win/ or $ARCHITECTURE eq 'cygwin') { - $cleartool = 'cleartool'; - } elsif (-x '/opt/rational/clearcase/bin/cleartool') { - $cleartool = '/opt/rational/clearcase/bin/cleartool'; - } # if + unless ($cleartool) { + if ($ARCHITECTURE =~ /Win/ or $ARCHITECTURE eq 'cygwin') { + $cleartool = 'cleartool'; + } elsif (-x '/opt/rational/clearcase/bin/cleartool') { + $cleartool = '/opt/rational/clearcase/bin/cleartool'; + } # if + } # unless # TODO: Need to catch SIGCHILD here in case the user does something like hit # Ctrl-C. Such an action may interrupt the underlying cleartool process and