Oh, yes you will! But this is windows. :-)

-Chris

On Thu, Feb 16, 2012 at 3:54 PM, Brett Porter <[email protected]> wrote:

> I'd think if you were going to work on the test it might be better to
> utilise a different technique or library... otherwise next you'll be
> checking for git.bat, etc...
>
> - Brett
>
> On 16/02/2012, at 3:36 PM, Chris Graham wrote:
>
> > Yes it would.
> >
> > So, should I cover all cases and just do a secondary test for git.cmd (if
> > isSystemCmd("git") returns false?).
> >
> > That is assuming that isSystemCmd("git.cmd") will return true. :-)
> >
> > -Chris
> >
> > On Thu, Feb 16, 2012 at 3:31 PM, Brett Porter <[email protected]> wrote:
> >
> >> Ah, I see. So if that were using an exec library (plexus-utils or
> >> commons-exec), it'd probably do "cmd /C git" or similar and it'd work.
> >>
> >> On 16/02/2012, at 2:54 PM, Chris Graham wrote:
> >>
> >>> I'm running it not under the bash shell. (I don't think that it's a
> >>> compulsory installation item).
> >>>
> >>> It calls this to determine if it's available (ScmTestCase.java)
> >>>
> >>>   /**
> >>>    *
> >>>    * @param cmd the executable to run, not null.
> >>>    * @return <code>true</code>
> >>>    */
> >>>   public static boolean isSystemCmd( String cmd )
> >>>   {
> >>>       try
> >>>       {
> >>>           Runtime.getRuntime().exec( cmd );
> >>>
> >>>           return true;
> >>>       }
> >>>       catch ( IOException e )
> >>>       {
> >>>           return false;
> >>>       }
> >>>   }
> >>>
> >>> It's kinda brute force.
> >>>
> >>> -Chris
> >>>
> >>> On Thu, Feb 16, 2012 at 2:47 PM, Brett Porter <[email protected]>
> wrote:
> >>>
> >>>> but under git bash and under command prompt, "git" should get the
> right
> >>>> thing. It should only be a problem if it's checking the executable
> name
> >> is
> >>>> exactly "git", or if you are trying to run it under cygwin with
> msysgit.
> >>>>
> >>>> On 16/02/2012, at 2:28 PM, Chris Graham wrote:
> >>>>
> >>>>> Ok. In my setup, (by default, until I fixed it that is), only the
> .cmd
> >>>> was
> >>>>> on the path.
> >>>>>
> >>>>> This causes the git tests to be skipped, as the test for it being
> >>>> available
> >>>>> fails.
> >>>>>
> >>>>> I was wondering if it's worth testing for the presence of "git.cmd"
> if
> >>>> the
> >>>>> test for "git" has failed? Then the tests should run on systems where
> >> the
> >>>>> git is installed.
> >>>>>
> >>>>> -Chris
> >>>>>
> >>>>> On Thu, Feb 16, 2012 at 2:24 PM, Brett Porter <[email protected]>
> >> wrote:
> >>>>>
> >>>>>> Yes, that's how msysgit is set up. You get some options when you run
> >> the
> >>>>>> installer about how it will be made available (path, only via git
> >> bash,
> >>>>>> etc).
> >>>>>>
> >>>>>> - Brett
> >>>>>>
> >>>>>> On 16/02/2012, at 1:45 PM, Chris Graham wrote:
> >>>>>>
> >>>>>>> Hi All.
> >>>>>>>
> >>>>>>> Is anyone using git on windows?
> >>>>>>>
> >>>>>>> If so, can you please check something for me?
> >>>>>>>
> >>>>>>> On my install, I only have git.cmd in the path. Not the .exe
> itself.
> >>>>>>>
> >>>>>>> Do others have the same?
> >>>>>>>
> >>>>>>> -Chris
> >>>>>>
> >>>>>> --
> >>>>>> Brett Porter
> >>>>>> [email protected]
> >>>>>> http://brettporter.wordpress.com/
> >>>>>> http://au.linkedin.com/in/brettporter
> >>>>>> http://twitter.com/brettporter
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>> For additional commands, e-mail: [email protected]
> >>>>>>
> >>>>>>
> >>>>
> >>>> --
> >>>> Brett Porter
> >>>> [email protected]
> >>>> http://brettporter.wordpress.com/
> >>>> http://au.linkedin.com/in/brettporter
> >>>> http://twitter.com/brettporter
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [email protected]
> >>>> For additional commands, e-mail: [email protected]
> >>>>
> >>>>
> >>
> >> --
> >> Brett Porter
> >> [email protected]
> >> http://brettporter.wordpress.com/
> >> http://au.linkedin.com/in/brettporter
> >> http://twitter.com/brettporter
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
>
> --
> Brett Porter
> [email protected]
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to