Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: command not found in automatic build #627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@ else
echo "Virtualbox images will not be built."
fi

if compare_versions $($packer_bin -v) $min_packer_ver false; then
# Get element after "Packer" or first if only version is present (handles older versions)
packer_version=$($packer_bin version -machine-readable | cut -d, -f 4 | head -n 1)

if compare_versions $packer_version $min_packer_ver false; then
echo "Compatible version of $packer_bin was found."
else
packer_bin=packer
if compare_versions $($packer_bin -v) $min_packer_ver false; then
if compare_versions $packer_version $min_packer_ver false; then
echo "Compatible version of $packer_bin was found."
else
echo "Compatible version of packer was not found. Please install from here: https://www.packer.io/downloads.html"
Expand Down