diff --git a/src/ViewModels/ExecuteCustomAction.cs b/src/ViewModels/ExecuteCustomAction.cs index 98cf10ef..0fd0fcfa 100644 --- a/src/ViewModels/ExecuteCustomAction.cs +++ b/src/ViewModels/ExecuteCustomAction.cs @@ -210,7 +210,8 @@ namespace SourceGit.ViewModels private string PrepareStringByTarget(string org) { - org = org.Replace("${REPO}", GetWorkdir()); + var repoPath = OperatingSystem.IsWindows() ? _repo.FullPath.Replace("/", "\\") : _repo.FullPath; + org = org.Replace("${REPO}", repoPath); return Target switch { @@ -223,11 +224,6 @@ namespace SourceGit.ViewModels }; } - private string GetWorkdir() - { - return OperatingSystem.IsWindows() ? _repo.FullPath.Replace("/", "\\") : _repo.FullPath; - } - private void Run(string args) { var start = new ProcessStartInfo();