[Jifty-commit] r1994 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Sep 29 04:01:13 EDT 2006
Author: audreyt
Date: Fri Sep 29 04:01:13 2006
New Revision: 1994
Modified:
jifty/trunk/lib/Jifty/Util.pm
Log:
* Fix the bin/jifty detection logick:
The .bat extension exists for MSWin32, cygwin and os2, so
use MM->maybe_command for those three platforms.
Also, the -e check is redundant after -x, and in Win32 we
can use bin/jifty.bat alone without bin/jifty, so make the
check respect that case.
Reported by: Stephen at s-team
Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm (original)
+++ jifty/trunk/lib/Jifty/Util.pm Fri Sep 29 04:01:13 2006
@@ -153,15 +153,14 @@
my @root = File::Spec->splitdir($_);
while (@root) {
my $try = File::Spec->catdir( @root, "bin", "jifty" );
- if ( -e $try
- # XXX: Just a quick hack
+ if (# XXX: Just a quick hack
# MSWin32's 'maybe_command' sees only file extension.
# Maybe we should check 'jifty.bat' instead on Win32,
# if it is (or would be) provided.
# Also, /usr/bin or /usr/local/bin should be taken from
# %Config{bin} or %Config{scriptdir} or something like that
# for portablility.
- and ($^O eq 'MSWin32' or -x $try or MM->maybe_command($try))
+ (-x $try or (($^O =~ /(?:MSWin32|cygwin|os2)/) and MM->maybe_command($try)))
and $try ne File::Spec->catdir($Config{bin}, "jifty")
and $try ne File::Spec->catdir($Config{scriptdir}, "jifty") )
{
More information about the Jifty-commit
mailing list