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) {