You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
491 B
20 lines
491 B
4 years ago
|
[CmdletBinding()]
|
||
|
param (
|
||
4 years ago
|
[Parameter(Mandatory = $true)]
|
||
|
[string] $runtime
|
||
4 years ago
|
)
|
||
|
|
||
|
$ErrorActionPreference = "Stop"
|
||
|
|
||
3 years ago
|
if (Get-Command chmod -errorAction SilentlyContinue) {
|
||
4 years ago
|
"The chmod command was found. Setting read + execute permission."
|
||
|
& chmod +rx ./publish/$runtime/trash
|
||
|
}
|
||
|
|
||
|
"Execute trash command to ensure basic functionality is working"
|
||
|
& .\publish\$runtime\trash -h
|
||
|
if ($LASTEXITCODE -ne 0) {
|
||
|
"Trash executable failed to run with exit code: $LASTEXITCODE"
|
||
|
exit -1
|
||
|
}
|