How do I install Homebrew through the command config?

0

Hi! I'm just getting started with Beanstalk so apologies if this is a trivial question. I'm trying to install Homebrew onto my Beanstalk application's instances, and I've unsuccessfully been trying to install Homebrew using a custom Linux command in a .config file.

I'm using the online reference here (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-commands) and I'm trying to install Homebrew with the command described here (https://brew.sh/).

Here is my homebrew.config file:

commands:
install_homebrew:
command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

The error I'm getting is:

2020-08-10 04:09:35 ERROR [Instance: i-096f98d15abfff217] Command failed on instance. Return code: 127 Output: /bin/bash: line 31: HOME: unbound variable.

And the offending line is:

HOMEBREW_CACHE="${HOME}/.cache/Homebrew"

I'm confused because I thought every Linux instance by default will have the HOME variable set. How can I get variables like HOME to be automatically set for Beanstalk .config commands?

Edited by: hardcode on Aug 11, 2020 12:00 AM

Edited by: hardcode on Aug 12, 2020 11:25 AM

質問済み 4年前902ビュー
2回答
0

Decided to just use an AMI.

回答済み 4年前
0

Could maybe try bash -lc to ensure it's a login shell.

https://qiita.com/ymm1x/items/8eba92e15420715e9a2f also has an example of how to check what's exported for your beanstalk platform. Not sure, but it might vary a little between platforms.

回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ