Skip to content

Commit

Permalink
fix: get-refs script path error on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Nov 19, 2019
1 parent e748fe2 commit 3c8ccc7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public static VisualElement GetRoot (VisualElement element)
public static class GitUtils
{
static readonly Regex REG_REFS = new Regex("refs/(tags|remotes/origin)/([^/]+),(.+),(.+)$", RegexOptions.Compiled | RegexOptions.Multiline);
const string GET_REFS_SCRIPT = "Packages/com.coffee.upm-git-extension/Editor/Commands/get-available-refs";
static readonly string GET_REFS_SCRIPT = "Packages/com.coffee.upm-git-extension/Editor/Commands/get-available-refs"
.Replace('\\', '/')
.Replace('/', Path.DirectorySeparatorChar);

/// <summary>
/// Fetch the all branch/tag names where the package can be installed from the repository.
Expand Down Expand Up @@ -144,7 +146,7 @@ static void ExecuteShell(string script, string args, Action<bool> callback)
Arguments = args,
CreateNoWindow = true,
FileName = script,
UseShellExecute = true,
UseShellExecute = false,
};

var launchProcess = System.Diagnostics.Process.Start(startInfo);
Expand Down

0 comments on commit 3c8ccc7

Please sign in to comment.