Browse Source

Merge pull request #134 from ionite34/fix-vlad-install

pull/14/head
Ionite 1 year ago committed by GitHub
parent
commit
8ef2801d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      StabilityMatrix/Helper/IPrerequisiteHelper.cs
  2. 4
      StabilityMatrix/Helper/PrerequisiteHelper.cs
  3. 5
      StabilityMatrix/Models/Packages/VladAutomatic.cs

2
StabilityMatrix/Helper/IPrerequisiteHelper.cs

@ -19,7 +19,7 @@ public interface IPrerequisiteHelper
/// <summary> /// <summary>
/// Run embedded git with the given arguments. /// Run embedded git with the given arguments.
/// </summary> /// </summary>
Task RunGit(params string[] args); Task RunGit(string? workingDirectory = null, params string[] args);
Task SetupPythonDependencies(string installLocation, string requirementsFileName, Task SetupPythonDependencies(string installLocation, string requirementsFileName,
IProgress<ProgressReport>? progress = null, Action<string?>? onConsoleOutput = null); IProgress<ProgressReport>? progress = null, Action<string?>? onConsoleOutput = null);

4
StabilityMatrix/Helper/PrerequisiteHelper.cs

@ -56,9 +56,9 @@ public class PrerequisiteHelper : IPrerequisiteHelper
this.settingsManager = settingsManager; this.settingsManager = settingsManager;
} }
public async Task RunGit(params string[] args) public async Task RunGit(string? workingDirectory = null, params string[] args)
{ {
var process = ProcessRunner.StartProcess(GitExePath, args); var process = ProcessRunner.StartProcess(GitExePath, args, workingDirectory: workingDirectory);
await ProcessRunner.WaitForExitConditionAsync(process); await ProcessRunner.WaitForExitConditionAsync(process);
} }

5
StabilityMatrix/Models/Packages/VladAutomatic.cs

@ -96,8 +96,9 @@ public class VladAutomatic : BaseGitPackage
Directory.CreateDirectory(InstallLocation); Directory.CreateDirectory(InstallLocation);
await PrerequisiteHelper.RunGit("clone", "https://github.com/vladmandic/automatic.git", InstallLocation); await PrerequisiteHelper.RunGit(null, "clone", "https://github.com/vladmandic/automatic",
await PrerequisiteHelper.RunGit("checkout", version, InstallLocation); InstallLocation);
await PrerequisiteHelper.RunGit(workingDirectory: InstallLocation, "checkout", version);
return version; return version;
} }

Loading…
Cancel
Save