Browse Source

Fix #901 - Executes git clone, based on the tye.yaml directory. (#904)

pull/1015/head
Martin Stühmer 5 years ago
committed by GitHub
parent
commit
021826460d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Microsoft.Tye.Core/ApplicationFactory.cs

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

Loading…
Cancel
Save