From 11132f73535fdf74d20e1d963dda752098ad2910 Mon Sep 17 00:00:00 2001 From: nibon7 Date: Fri, 30 Jun 2023 20:53:34 +0800 Subject: [PATCH] Fix cargo-build-nu (#9571) # Description This PR should fix #9565 Close #9565 cc @hustcer # User-Facing Changes # Tests + Formatting # After Submitting --- .github/workflows/release-pkg.nu | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-pkg.nu b/.github/workflows/release-pkg.nu index 61c9d4369b..504df66620 100755 --- a/.github/workflows/release-pkg.nu +++ b/.github/workflows/release-pkg.nu @@ -189,13 +189,19 @@ if $os in [$USE_UBUNTU, 'macos-latest'] { } def 'cargo-build-nu' [ options: string ] { - let features = if $os == 'windows-latest' { - '' + if ($options | str trim | is-empty) { + if $os == 'windows-latest' { + cargo build --release --all --target $target + } else { + cargo build --release --all --target $target --features=static-link-openssl + } } else { - '--features=static-link-openssl' + if $os == 'windows-latest' { + cargo build --release --all --target $target $options + } else { + cargo build --release --all --target $target --features=static-link-openssl $options + } } - - cargo build --release --all --target $target $features $options } # Print a horizontal line marker