Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Waiting for bash command to complete
Message
 
À
12/10/2016 16:48:16
Information générale
Forum:
Git
Catégorie:
Automation
Divers
Thread ID:
01641858
Message ID:
01641860
Vues:
52
Why are you running Git through Bash? That just adds a bunch of overhead. Can't you just call the Windows command line version of Git?

+++ Rick ---

>When I use a VB.NET code to execute a Git bash command script such as:
>
>
>        Using loProcess As New Process
>		loProcess.StartInfo.FileName = lcFileName
>		loProcess.StartInfo.WorkingDirectory = lcWorkingDirectory
>		loProcess.StartInfo.Arguments = lcArguments
>		loProcess.StartInfo.RedirectStandardOutput = lRedirectStandardOutput
>                loProcess.Start()
>
>		' Wait for the process to complete before proceeding
>		loProcess.WaitForExit()
>
>
>Where the Git command is something like:
>
>
>"C:\Program Files\Git\git-bash.exe" Script.txt
>
>
>This works. The problem, however, is that, because git-bash executes a script file, the DOS interpreter thinks it's done with it and releases the process immediately to .NET, so the WaitForExit() has no effect.
>
>Is there a way to tell git-bash to execute a script but wait until the end of Script.txt before it releases the control to DOS?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform