Skip to content

Commit 55bcd61

Browse files
committed
Added WorkingDirectory property to process options.
1 parent 9b15042 commit 55bcd61

File tree

1 file changed

+4
-0
lines changed
  • Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor

1 file changed

+4
-0
lines changed

Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor/Git.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Diagnostics;
7+
using System.IO;
78
using System.Threading.Tasks;
89

910
namespace CandyCoded.GitStatus
@@ -18,13 +19,16 @@ public static class Git
1819
private static string GitPath => "/usr/local/bin/git";
1920
#endif
2021

22+
private static string RepoPath => $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}";
23+
2124
public static Process GenerateProcess(string path, string arguments)
2225
{
2326

2427
return Process.Start(new ProcessStartInfo
2528
{
2629
FileName = path,
2730
Arguments = arguments,
31+
WorkingDirectory = RepoPath,
2832
UseShellExecute = false,
2933
RedirectStandardOutput = true,
3034
RedirectStandardError = true,

0 commit comments

Comments
 (0)