Skip to content

Commit 9144dae

Browse files
committed
code_style: remove unnecessary function call
Signed-off-by: leo <longshuang@msn.cn>
1 parent 8395efd commit 9144dae

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/ViewModels/ExecuteCustomAction.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ private void PrepareControlParameters()
210210

211211
private string PrepareStringByTarget(string org)
212212
{
213-
org = org.Replace("${REPO}", GetWorkdir());
213+
var repoPath = OperatingSystem.IsWindows() ? _repo.FullPath.Replace("/", "\\") : _repo.FullPath;
214+
org = org.Replace("${REPO}", repoPath);
214215

215216
return Target switch
216217
{
@@ -223,11 +224,6 @@ private string PrepareStringByTarget(string org)
223224
};
224225
}
225226

226-
private string GetWorkdir()
227-
{
228-
return OperatingSystem.IsWindows() ? _repo.FullPath.Replace("/", "\\") : _repo.FullPath;
229-
}
230-
231227
private void Run(string args)
232228
{
233229
var start = new ProcessStartInfo();

0 commit comments

Comments
 (0)