From df2b206cd097ffdb404dca71c0d3fcb58b749f60 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 7 Jan 2025 20:11:55 +0100 Subject: [PATCH] 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 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2e069fec..1b964fb0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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" }