From 409d9e74608ed92de4bf9c056420bbd1e9359a6f Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Mon, 2 Dec 2024 14:55:43 +0530 Subject: [PATCH] sudo for installing hab pkg Signed-off-by: nitin sanghi --- .github/workflows/habitat-build.yml | 4 ++-- habitat/tests/test.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/habitat-build.yml b/.github/workflows/habitat-build.yml index 8f73487a..6a13a4e1 100644 --- a/.github/workflows/habitat-build.yml +++ b/.github/workflows/habitat-build.yml @@ -91,7 +91,7 @@ jobs: hab pkg list --all chmod +x habitat/tests/test.sh - habitat/tests/test.sh "${{vars.PKG_IDENT}}" + habitat/tests/test.sh $hartfile - name: Install Habitat on Windows if: ${{ matrix.os == 'windows-latest' }} shell: pwsh @@ -112,4 +112,4 @@ jobs: write-output "--- running windows hab build" hab pkg build . hab pkg list --all - habitat/tests/test.ps1 "${{vars.PKG_IDENT}}" \ No newline at end of file + habitat/tests/test.ps1 \ No newline at end of file diff --git a/habitat/tests/test.sh b/habitat/tests/test.sh index 06e05c56..e0b87773 100755 --- a/habitat/tests/test.sh +++ b/habitat/tests/test.sh @@ -21,7 +21,7 @@ package_version=$(awk -F / '{print $3}' <<<"$pkg_ident") cd "${project_root}" echo "--- :mag_right: Testing ${pkg_ident} executables" -actual_version=$(hab pkg exec "${pkg_ident}" chef-cli -- -v | sed -E 's/.*Version ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') +actual_version=$(hab pkg exec "${pkg_ident}" chef-cli -v | sed -E 's/.*Version ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') [[ "$package_version" = "$actual_version" ]] || error "chef-cli is not the expected version. Expected '$package_version', got '$actual_version'" echo "--- :Running rake"