Add release workflow; fix ports when running outside of Docker (#2)
* fix yml formatting * test build action * move ci workflow * fix unit tests from dotnet test command * add release workflow * try another matrix syntax * fix path to csproj * fix target framework * more release fixes * port fixes for running outside of docker
This commit is contained in:
@@ -51,10 +51,21 @@ namespace ErsatzTV.Core.FFmpeg
|
||||
|
||||
private async Task<Option<string>> LocateExecutableOnPathAsync(string executableBase)
|
||||
{
|
||||
string locateCommand = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "where" : "which";
|
||||
string executable = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
? $"{executableBase}.exe"
|
||||
: executableBase;
|
||||
|
||||
string processFileName = Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
if (!string.IsNullOrWhiteSpace(processFileName))
|
||||
{
|
||||
string localFileName = Path.Combine(Path.GetDirectoryName(processFileName) ?? string.Empty, executable);
|
||||
if (File.Exists(localFileName))
|
||||
{
|
||||
return localFileName;
|
||||
}
|
||||
}
|
||||
|
||||
string locateCommand = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "where" : "which";
|
||||
using var p = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
|
||||
Reference in New Issue
Block a user