Browse Source

Merge pull request #466 from ionite34/fix-startapp

Fix non-macos StartApp filename and args
pull/438/head
Ionite 10 months ago committed by GitHub
parent
commit
eda036ce69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 19
      StabilityMatrix.Core/Processes/ProcessRunner.cs

4
CHANGELOG.md

@ -5,6 +5,10 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
## v2.8.0-pre.2
### Fixed
- Fixed Auto-update failing to start new version on Windows and Linux when path contains spaces
## v2.8.0-pre.1
### Added
- Added Package Extensions (Plugins) management - accessible from the Packages' 3-dot menu. Currently supports ComfyUI and A1111.

19
StabilityMatrix.Core/Processes/ProcessRunner.cs

@ -34,20 +34,21 @@ public static class ProcessRunner
/// </summary>
public static Process StartApp(string path, ProcessArgs args)
{
var startInfo = new ProcessStartInfo();
if (Compat.IsMacOS)
{
var startInfo = new ProcessStartInfo
startInfo.FileName = "open";
startInfo.Arguments = args.Prepend(path).ToString();
startInfo.UseShellExecute = true;
}
else
{
FileName = "open",
Arguments = args.Prepend([path, "--args"]),
UseShellExecute = true
};
return Process.Start(startInfo)
?? throw new NullReferenceException("Process.Start returned null");
startInfo.FileName = path;
startInfo.Arguments = args;
}
return Process.Start(args.Prepend(path));
return Process.Start(startInfo) ?? throw new NullReferenceException("Process.Start returned null");
}
/// <summary>

Loading…
Cancel
Save