I'm running jf.exe from PowerShell and its not working and throwing below error, have tried multiple ways (commented in the code) below nothing seem to work, the EXE"jf.exe: exists in the exact same location
At C:\Program Files\actions-runner\_work\_temp\62db6136-4c6a-45db-9d86-865e38a2797b.ps1:4 char:33
+ "E:\Program Files\JFrog\jf.exe" rt ping
+ ~~
Unexpected token 'rt' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
Error: Process completed with exit code 1.
name: Build
on:
workflow_dispatch
jobs:
build:
name: Build
runs-on: [self-hosted,X64,dev,Windows]
steps:
- uses: actions/checkout@v2
- run: |
# Ping the server
#$cmd = "E:\Program Files\JFrog\jf.exe rt ping"
#Invoke-Expression -Command "& 'E:\Program Files\JFrog\jf.exe' rt ping"
#Invoke-Expression -Command "& '$cmd'"
[string]$JFExe = "E:\Program Files\JFrog\jf.exe"
[Array]$arguments = "rt", "ping"
& $JFExe $arguments