@@ -247,34 +247,42 @@ jobs:
247247 working-directory : ${{ github.workspace }}\wolfssh
248248 shell : pwsh
249249 run : |
250+ $searchRoot = "${{ github.workspace }}"
251+ Write-Host "Searching for built executables under: $searchRoot"
252+
250253 # Find wolfsshd.exe
251- $sshdExe = Get-ChildItem -Recurse -Filter "wolfsshd.exe" -ErrorAction SilentlyContinue |
254+ $sshdExe = Get-ChildItem -Path $searchRoot - Recurse -Filter "wolfsshd.exe" -ErrorAction SilentlyContinue |
252255 Where-Object { $_.FullName -like "*Release*" -or $_.FullName -like "*Debug*" } |
253256 Select-Object -First 1
254257 if ($sshdExe) {
255258 Write-Host "Found wolfsshd.exe at: $($sshdExe.FullName)"
256259 Add-Content -Path $env:GITHUB_ENV -Value "SSHD_PATH=$($sshdExe.FullName)"
257260 } else {
258261 Write-Host "ERROR: wolfsshd.exe not found"
259- Get-ChildItem -Recurse -Filter "*.exe" | Select-Object FullName
262+ Get-ChildItem -Path $searchRoot - Recurse -Filter "*.exe" -ErrorAction SilentlyContinue | Select-Object FullName
260263 exit 1
261264 }
262265
263- # Find wolfsftp. exe
264- $sftpExe = Get-ChildItem -Recurse -Filter "wolfsftp.exe" -ErrorAction SilentlyContinue |
266+ # Find wolfsftp client exe (project name is often wolfsftp-client)
267+ $sftpExe = Get-ChildItem -Path $searchRoot - Recurse -Filter "wolfsftp.exe" -ErrorAction SilentlyContinue |
265268 Where-Object { $_.FullName -like "*Release*" -or $_.FullName -like "*Debug*" } |
266269 Select-Object -First 1
270+ if (-not $sftpExe) {
271+ $sftpExe = Get-ChildItem -Path $searchRoot -Recurse -Filter "wolfsftp-client.exe" -ErrorAction SilentlyContinue |
272+ Where-Object { $_.FullName -like "*Release*" -or $_.FullName -like "*Debug*" } |
273+ Select-Object -First 1
274+ }
267275 if ($sftpExe) {
268- Write-Host "Found wolfsftp. exe at: $($sftpExe.FullName)"
276+ Write-Host "Found SFTP client exe at: $($sftpExe.FullName)"
269277 Add-Content -Path $env:GITHUB_ENV -Value "SFTP_PATH=$($sftpExe.FullName)"
270278 } else {
271- Write-Host "ERROR: wolfsftp. exe not found"
272- Get-ChildItem -Recurse -Filter "*.exe" | Select-Object FullName
279+ Write-Host "ERROR: SFTP client exe not found (wolfsftp.exe or wolfsftp-client.exe) "
280+ Get-ChildItem -Path $searchRoot - Recurse -Filter "*.exe" -ErrorAction SilentlyContinue | Select-Object FullName
273281 exit 1
274282 }
275283
276- # Find wolfssh.exe (SSH client)
277- $sshExe = Get-ChildItem -Recurse -Filter "wolfssh.exe" -ErrorAction SilentlyContinue |
284+ # Find wolfssh.exe (SSH client) (optional)
285+ $sshExe = Get-ChildItem -Path $searchRoot - Recurse -Filter "wolfssh.exe" -ErrorAction SilentlyContinue |
278286 Where-Object { $_.FullName -like "*Release*" -or $_.FullName -like "*Debug*" } |
279287 Select-Object -First 1
280288 if ($sshExe) {
0 commit comments