From 964294fbb4657d18fec426b005ed4ed1bdc365ef Mon Sep 17 00:00:00 2001 From: Ron <45816308+rjaegers@users.noreply.github.com> Date: Sat, 28 Sep 2024 08:33:59 +0000 Subject: [PATCH] fix: patch root's .bashrc file to include completion --- .devcontainer/cpp/Dockerfile | 4 +++- .devcontainer/rust/Dockerfile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/cpp/Dockerfile b/.devcontainer/cpp/Dockerfile index 077288d7..baa819b7 100644 --- a/.devcontainer/cpp/Dockerfile +++ b/.devcontainer/cpp/Dockerfile @@ -95,10 +95,12 @@ RUN --mount=type=cache,target=/root/.ccache,sharing=locked \ && rm -rf /var/lib/apt/lists/* # Update all tool alternatives to the correct version +# and patch root's bashrc to include bash-completion RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-13 20 \ && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 \ && update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 10 \ && update-alternatives --install /usr/bin/iwyu iwyu /usr/local/bin/include-what-you-use 10 \ && update-alternatives --install /usr/bin/mull-runner mull-runner /usr/local/bin/mull-runner-${CLANG_VERSION} 10 \ && update-alternatives --install /usr/lib/mull-ir-frontend mull-ir-frontend /usr/local/lib/mull-ir-frontend-${CLANG_VERSION} 10 \ - && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 + && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \ + && cp /etc/skel/.bashrc /root/.bashrc diff --git a/.devcontainer/rust/Dockerfile b/.devcontainer/rust/Dockerfile index 90b7dc07..6dc5fa7f 100644 --- a/.devcontainer/rust/Dockerfile +++ b/.devcontainer/rust/Dockerfile @@ -39,7 +39,9 @@ RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \ && git -C /usr/local clone -b v2.1.0 https://github.com/bats-core/bats-assert.git # Update all tool alternatives to the correct version -RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 +# and patch root's bashrc to include bash-completion +RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 \ + && cp /etc/skel/.bashrc /root/.bashrc # Install additional rust tools RUN wget -qO - "https://github.com/cargo-bins/cargo-binstall/releases/download/v${CARGO_BINSTALL_VERSION}/cargo-binstall-$(uname -m)-unknown-linux-gnu.tgz" | tar xz -C "/usr/bin" \