Skip to content

Commit 65a0f8c

Browse files
change default hab pkg install behavior to specify channel
Signed-off-by: Peter Arsenault <parsenau@progress.com>
1 parent b77e469 commit 65a0f8c

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • .github/actions/chef-download-grype-snapshot

.github/actions/chef-download-grype-snapshot/run.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,11 @@ def check_existing_version(scan_mode, data_repo_path, product, channel, download
522522

523523
# Install the package (with channel if specified) - requires sudo for /hab/pkgs/ access
524524
# Note: Chef packages now require HAB_AUTH_TOKEN even for stable channel
525-
install_cmd = f"sudo hab pkg install {pkg_to_install}"
526-
if hab_channel and hab_channel != "stable":
527-
install_cmd += f" --channel {hab_channel}"
525+
install_cmd = f"sudo hab pkg install {pkg_to_install} --channel {hab_channel}"
528526

529527
# Set HAB_AUTH_TOKEN if provided (required for protected packages including chef/* in stable)
530528
if hab_auth_token:
531-
if hab_channel and hab_channel != "stable":
532529
install_cmd = f"sudo HAB_AUTH_TOKEN={hab_auth_token} hab pkg install {pkg_to_install} --channel {hab_channel}"
533-
else:
534-
install_cmd = f"sudo HAB_AUTH_TOKEN={hab_auth_token} hab pkg install {pkg_to_install}"
535530

536531
run(["bash", "-lc", install_cmd], check=True)
537532

0 commit comments

Comments
 (0)