From 021826460da5e5fdabc4ee90fe3c35171aeda1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Wed, 7 Apr 2021 19:22:59 +0200 Subject: [PATCH] Fix #901 - Executes git clone, based on the tye.yaml directory. (#904) --- src/Microsoft.Tye.Core/ApplicationFactory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Tye.Core/ApplicationFactory.cs b/src/Microsoft.Tye.Core/ApplicationFactory.cs index 476bdcb1..33743bdf 100644 --- a/src/Microsoft.Tye.Core/ApplicationFactory.cs +++ b/src/Microsoft.Tye.Core/ApplicationFactory.cs @@ -267,13 +267,13 @@ namespace Microsoft.Tye else if (!string.IsNullOrEmpty(configService.Repository)) { // clone to .tye folder - var path = configService.CloneDirectory ?? Path.Join(rootConfig.Source.DirectoryName, ".tye", "deps"); + var path = configService.CloneDirectory ?? Path.Join(".tye", "deps"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } - var clonePath = Path.Combine(path, configService.Name); + var clonePath = Path.Combine(rootConfig.Source.DirectoryName!, path, configService.Name); if (!Directory.Exists(clonePath)) { @@ -282,7 +282,7 @@ namespace Microsoft.Tye throw new CommandException($"Cannot clone repository {configService.Repository} because git is not installed. Please install git if you'd like to use \"repository\" in tye.yaml."); } - var result = await ProcessUtil.RunAsync("git", $"clone {configService.Repository} \"{clonePath}\"", workingDirectory: path, throwOnError: false); + var result = await ProcessUtil.RunAsync("git", $"clone {configService.Repository} \"{clonePath}\"", workingDirectory: rootConfig.Source.DirectoryName, throwOnError: false); if (result.ExitCode != 0) {