Beispiel #1
0
		public static Task<int> RunGitAsync(string workingDir, params string[] arguments)
		{
			string git = FindGit();
			if (git == null)
				return Task.FromResult(9009);
			ProcessRunner p = new ProcessRunner();
			p.WorkingDirectory = workingDir;
			return p.RunInOutputPadAsync(GitMessageView.Category, git, arguments);
		}
		void RunRestore()
		{
			var commandLine = new NuGetPackageRestoreCommandLine(solution);
			commandLine.Command = NuGetExePath.GetPath();
			
			var runner = new ProcessRunner();
			runner.WorkingDirectory = Path.GetDirectoryName(solution.FileName);
			runner.RunInOutputPadAsync(outputMessagesView.OutputCategory, commandLine.Command, commandLine.Arguments).FireAndForget();
		}
Beispiel #3
0
		public static Task<int> RunGitAsync(string workingDir, params string[] arguments)
		{
			ProcessRunner p = new ProcessRunner();
			p.WorkingDirectory = workingDir;
			return p.RunInOutputPadAsync(GitMessageView.Category, "git", arguments);
		}
Beispiel #4
0
		public static async Task<int> RunGitAsync(string workingDir, params string[] arguments)
		{
			string git = FindGit();
			if (git == null)
				return 9009;
			// Wait until other git calls have finished running
			// This prevents git from failing due to a locked index when several files
			// are added concurrently
			await gitMutex.WaitAsync();
			try {
				ProcessRunner p = new ProcessRunner();
				p.WorkingDirectory = workingDir;
				return await p.RunInOutputPadAsync(GitMessageView.Category, git, arguments);
			} finally {
				gitMutex.Release();
			}
		}