From 442f65764eba99ae3c9f135d8cb5ea6136eb00bd Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 6 Nov 2024 11:23:01 -0800 Subject: [PATCH] fix SKIP_ARCH_DETECTION logic Signed-off-by: Justin Kolberg --- .github/workflows/build_packages.yml | 5 ++--- install-script/install.ps1 | 12 ++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_packages.yml b/.github/workflows/build_packages.yml index 5644b72f..ef6e2a51 100644 --- a/.github/workflows/build_packages.yml +++ b/.github/workflows/build_packages.yml @@ -258,6 +258,5 @@ jobs: env: S3_BUCKET: sumologic-osc-ci-builds OVERRIDE_ARCH: x64 - run: | - $env:SKIP_ARCHITECTURE_DETECTION = $True - make test + SKIP_ARCH_DETECTION: 1 + run: make test diff --git a/install-script/install.ps1 b/install-script/install.ps1 index 97158f5f..3334ac94 100644 --- a/install-script/install.ps1 +++ b/install-script/install.ps1 @@ -40,10 +40,8 @@ param ( # SkipArchDetection will disable the detection of the CPU architecture. # CPU architecture detection is slow. Using OverrideArch with this flag - # improves the overall time it takes to execute this script. The default - # value is set to the value of the SKIP_ARCHITECTURE_DETECTION environment - # variable. - [bool] $SkipArchDetection = $env:SKIP_ARCHITECTURE_DETECTION, + # improves the overall time it takes to execute this script. + [bool] $SkipArchDetection, # S3Bucket is used to specify which S3 bucket to download the MSI package # from. The default value is set to the value of the S3_BUCKET environment @@ -56,6 +54,12 @@ param ( [string] $S3Region = $env:S3_REGION ) +# If the environment variable SKIP_ARCH_DETECTION is set and is not +# equal to "0" then set $SkipArchDetection to $True. +if ($env:SKIP_ARCH_DETECTION -ne "" -and $env:SKIP_ARCH_DETECTION -ne "0") { + $SkipArchDetection = $True +} + if ($S3Bucket -eq "") { $S3Bucket = "sumologic-osc-stable" }