diff --git a/orka/templates/macos-13-arm-release.pkr.hcl b/orka/templates/macos-13-arm-release.pkr.hcl index c94d8530d..fce129ebc 100644 --- a/orka/templates/macos-13-arm-release.pkr.hcl +++ b/orka/templates/macos-13-arm-release.pkr.hcl @@ -95,6 +95,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-arm-test.pkr.hcl b/orka/templates/macos-13-arm-test.pkr.hcl index df4371b80..83d23aaa0 100644 --- a/orka/templates/macos-13-arm-test.pkr.hcl +++ b/orka/templates/macos-13-arm-test.pkr.hcl @@ -101,6 +101,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-intel-release.pkr.hcl b/orka/templates/macos-13-intel-release.pkr.hcl index ba79bba4c..d619c79c0 100644 --- a/orka/templates/macos-13-intel-release.pkr.hcl +++ b/orka/templates/macos-13-intel-release.pkr.hcl @@ -93,6 +93,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [ diff --git a/orka/templates/macos-13-intel-test.pkr.hcl b/orka/templates/macos-13-intel-test.pkr.hcl index fdc96bc03..b4bb92c24 100644 --- a/orka/templates/macos-13-intel-test.pkr.hcl +++ b/orka/templates/macos-13-intel-test.pkr.hcl @@ -100,6 +100,14 @@ build { "eval \"$($(brew --prefix)/bin/brew shellenv)\"" ] } + // Ensure Homebrew environment is set up in the shell profile. + provisioner "shell" { + inline = [ + "echo 'Setting up Homebrew environment in shell profile...'", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.zshrc", + "echo 'eval \"$(/usr/local/bin/brew shellenv)\"' >> /Users/admin/.bash_profile" + ] + } // Check Homebrew. Ignore errors because we are not using the last version of Xcode. provisioner "shell" { inline = [