parent
00d9ec2f33
commit
10600ae4f1
@ -1,19 +1,19 @@
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $PathToTrashExe
|
||||
[string] $PathToExe
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (Get-Command chmod -errorAction SilentlyContinue) {
|
||||
"The chmod command was found. Setting read + execute permission."
|
||||
& chmod +rx $PathToTrashExe
|
||||
& chmod +rx $PathToExe
|
||||
}
|
||||
|
||||
"Execute trash command to ensure basic functionality is working"
|
||||
& $PathToTrashExe -h
|
||||
"Execute recyclarr command to ensure basic functionality is working"
|
||||
& $PathToExe -h
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
"Trash executable failed to run with exit code: $LASTEXITCODE"
|
||||
"Recyclarr executable failed to run with exit code: $LASTEXITCODE"
|
||||
exit -1
|
||||
}
|
||||
|
Loading…
Reference in new issue