From 3c8ccc7787cad2b387f4849b8f92d3c27d5d44e5 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Tue, 19 Nov 2019 14:18:15 +0900 Subject: [PATCH] fix: get-refs script path error on windows --- .../Editor/InternalBridge/Utils.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Packages/com.coffee.upm-git-extension/Editor/InternalBridge/Utils.cs b/Packages/com.coffee.upm-git-extension/Editor/InternalBridge/Utils.cs index 9f249c0..1db868f 100644 --- a/Packages/com.coffee.upm-git-extension/Editor/InternalBridge/Utils.cs +++ b/Packages/com.coffee.upm-git-extension/Editor/InternalBridge/Utils.cs @@ -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); /// /// Fetch the all branch/tag names where the package can be installed from the repository. @@ -144,7 +146,7 @@ static void ExecuteShell(string script, string args, Action callback) Arguments = args, CreateNoWindow = true, FileName = script, - UseShellExecute = true, + UseShellExecute = false, }; var launchProcess = System.Diagnostics.Process.Start(startInfo);