Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 7127
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.049
Fixed in: (no value)



Subject: Install fails - Cannot find "favorite shell" for Cygwin
While running Makefile.PL, setting up favorite shell to be /bin/bash.exe (or any other shell in bin): Your favorite command line shell? : bash I'm sorry, 'bash' is not a valid option, please try again Your favorite command line shell? : bsh I'm sorry, 'bsh' is not a valid option, please try again Your favorite command line shell? : /bin/bash I'm sorry, '/bin/bash' is not a valid option, please try again Your favorite command line shell? : /bin/bash.exe I'm sorry, '/bin/bash.exe' is not a valid option, please try again Your favorite command line shell? : /cygdrive/c/Cygwin/bin/bash I'm sorry, '/cygdrive/c/Cygwin/bin/bash' is not a valid option, please try again Your favorite command line shell? : /cygdrive/c/Cygwin/bin/bash.exe I'm sorry, '/cygdrive/c/Cygwin/bin/bash.exe' is not a valid option, please try a gain Your favorite command line shell? : c:\cygwin\bin\bash.exe I'm sorry, 'c:\cygwin\bin\bash.exe' is not a valid option, please try again Your favorite command line shell? :
From: "Jos I. Boumans" <kane [...] dwim.org>
Subject: Re: [Cpanplus-bugs] [cpan #7127] Install fails - Cannot find "favorite shell" for Cygwin
Date: Mon, 9 Aug 2004 15:33:04 +0200
To: bug-CPANPLUS [...] rt.cpan.org
RT-Send-Cc:
On Jul 27, 2004, at 5:48 AM, Guest via RT wrote: Show quoted text
> While running Makefile.PL, setting up favorite shell to be > /bin/bash.exe (or any other shell in bin): > > Your favorite command line shell? : bash > I'm sorry, 'bash' is not a valid option, please try again
Hmm, i can't reproduce this behaviour on any of my other boxes, but i don't have a cygwin/m$ environment handy. Here's what the code does; When you run setup, you're executing code in the module CPANPLUS::Configure::Setup. The relevant line for setting up the shell is this at line ~980: $prog = ( MM->maybe_command($answer) or _find_exe($answer, [@path]) ); ie, it looks up if your answer is thought to be a command by ExtUtils::MakeMaker, or our own, handrolled _find_exe, which looks like this (line ~1213): ## locate a given executable in the given path ## ## (takes scalar and arrayref, returns scalar) ## sub _find_exe { my ($exe, $path) = @_; my $param = (($exe =~ s/(\s+.*)//) ? $1 : ''); for my $dir (@{$path}) { my $abs = File::Spec->catfile($dir, $exe); return $abs.$param if $abs = MM->maybe_command($abs); } #for } #_find_exe But apparently neither of them are finding 'bash' or any other answer you give as an executable. I suggest adding some debug lines around this piece of code to see where it's failing. -- Jos Boumans How do I prove I am not crazy to people who are? CPANPLUS http://cpanplus.sf.net
[kane@dwim.org - Mon Aug 9 09:32:17 2004]: Show quoted text
> > While running Makefile.PL, setting up favorite shell to be > > /bin/bash.exe (or any other shell in bin): > > > > Your favorite command line shell? : bash > > I'm sorry, 'bash' is not a valid option, please try again
I've recently acquired a m$/cygwin system, and found that detecting the bash shell was no problem: The CPAN++ module needs a directory of its own to cache important index files and maybe keep a temporary mirror of CPAN files. This may be a site-wide directory or a personal directory. First of all, I'd like to create this directory. Where? [/home/kane/.cpanplus]: Your CPAN++ build and cache directory has been set to: /home/kane/.cpanplus Your favorite command line shell? : bash Your command line shell has been set to: /usr/bin/bash Where can I find your 'curl' executable? [curl]: