Skip to content

Commit 56b0f03

Browse files
committed
aider: Fix build for mcr.microsoft.com/devcontainers/base:ubuntu 🤞
1 parent cd9c3a4 commit 56b0f03

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/aider/install.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,20 @@ main() {
5757
fi
5858

5959
detect_username
60-
6160
if [ "$AIDER_VERSION" = latest ]; then
6261
echo "Installing latest Aider..."
63-
su -c 'pipx install aider-chat' "$USERNAME"
62+
# NOTE(ivy): PS1=true works around an edge case where pipx isn't added
63+
# to the PATH. This happens with the `mcr.microsoft.com/devcontainers/base:ubuntu`
64+
# image which includes a check at the top of /etc/bash.bashrc which
65+
# returns in non-interactive shells.
66+
su - "$USERNAME" bash -c "PS1=true; . /etc/bash.bashrc || true; pipx install aider-chat"
6467
else
6568
echo "Installing Aider version $AIDER_VERSION..."
66-
su -c "pipx install aider-chat==${AIDER_VERSION}" "$USERNAME"
69+
# NOTE(ivy): PS1=true works around an edge case where pipx isn't added
70+
# to the PATH. This happens with the `mcr.microsoft.com/devcontainers/base:ubuntu`
71+
# image which includes a check at the top of /etc/bash.bashrc which
72+
# returns in non-interactive shells.
73+
su - "$USERNAME" bash -c "PS1=true; . /etc/bash.bashrc || true; pipx install aider-chat==${AIDER_VERSION}"
6774
fi
6875

6976
echo "Aider has been installed!"

0 commit comments

Comments
 (0)