1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

ci/appveyor: fix PowerShell warning (#1514)

in WinCNG builds, e.g. VS2015, WinCNG, x86, Server 2016:
```
Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At line:10 char:16
+   if(Test-Path $env:OPENSSL_ROOT_DIR) {
+                ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand
```
https://ci.appveyor.com/project/libssh2org/libssh2/builds/51280178/job/9ddtkb91w54si3da#L85
This commit is contained in:
Viktor Szakats
2025-01-07 20:11:55 +01:00
committed by GitHub
parent 25d3a09207
commit df2b206cd0

View File

@@ -149,7 +149,7 @@ build_script:
}
$options += "-DCRYPTO_BACKEND=$env:CRYPTO_BACKEND"
if($env:OPENSSL_ROOT_DIR -ne '') {
if($env:OPENSSL_ROOT_DIR -and $env:OPENSSL_ROOT_DIR -ne '') {
if(Test-Path $env:OPENSSL_ROOT_DIR) {
$options += "-DOPENSSL_ROOT_DIR=$env:OPENSSL_ROOT_DIR"
}