mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Fixed: Executing powershell and python scripts directly in Connect->Custom Scripts
This commit is contained in:
@@ -377,6 +377,16 @@ namespace NzbDrone.Common.Processes
|
||||
return ("cmd.exe", $"/c {path} {args}");
|
||||
}
|
||||
|
||||
if (OsInfo.IsWindows && path.EndsWith(".ps1", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return ("powershell.exe", $"-ExecutionPolicy Bypass -NoProfile -File {path} {args}");
|
||||
}
|
||||
|
||||
if (OsInfo.IsWindows && path.EndsWith(".py", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return ("python.exe", $"{path} {args}");
|
||||
}
|
||||
|
||||
return (path, args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user