From d49319138ea84b9389b1de6996db30446a73c441 Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Mon, 27 Nov 2023 22:01:03 -0800 Subject: [PATCH] Fix: warning: failed to get HEAD path (#878) --- build.rs | 6 +++++- build/build-image/Dockerfile | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index d55f33a0f1..220ea52223 100644 --- a/build.rs +++ b/build.rs @@ -32,7 +32,11 @@ fn git_path(path: &str) -> IoResult { if !output.status.success() { return Err(Error::new( ErrorKind::Other, - format!("`git` failed with status {}", output.status), + format!( + "`git` failed with status {}: {}", + output.status, + std::str::from_utf8(&output.stderr).unwrap_or("no output") + ), )); } diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index d92aeeb48d..bbe7e97c59 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -25,7 +25,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \ # Install packages RUN set -eux && \ apt-get update && \ - apt-get install -y lsb-release jq curl wget zip build-essential software-properties-common \ + apt-get install -y lsb-release jq curl wget zip git build-essential software-properties-common \ libssl-dev pkg-config python3-pip bash-completion g++-x86-64-linux-gnu g++-mingw-w64-x86-64 && \ pip3 install live-server && \ echo "source /etc/bash_completion" >> /root/.bashrc @@ -51,6 +51,9 @@ WORKDIR /tmp RUN wget --quiet -O htmltest.tar.gz "https://github.com/wjdp/htmltest/releases/download/v0.16.0/htmltest_0.16.0_linux_$(dpkg --print-architecture).tar.gz" && \ tar -xf htmltest.tar.gz && mv ./htmltest /usr/local/bin/ && rm htmltest.tar.gz +# Add /workspace as a git safe directory +RUN git config --global --add safe.directory /workspace + # Install Rust. Inspiration from: https://github.com/rust-lang/docker-rust/blob/master/1.64.0/bullseye/Dockerfile RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \