From 1512eddd43dfd37d22e0109ba155def4b9163db6 Mon Sep 17 00:00:00 2001 From: Ali Nezhadi Khelejani <10778765+ali10129@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:15:33 +0200 Subject: [PATCH] misc: Update on-create.sh (#1477) After merging the old personal gem5 repository with the stable version v24, I tried to run the project inside the `.devcontainer` environment. During the image build process, I encountered the following error: ```sh [7683 ms] Start: Run in container: /bin/sh -c ./.devcontainer/on-create.sh fatal: detected dubious ownership in repository at '/workspaces/gem5' To add an exception for this directory, call: git config --global --add safe.directory /workspaces/gem5 [7724 ms] onCreateCommand failed with exit code 128. Skipping any further user-provided commands. ``` This error occurred due to an ownership permission problem, which I resolved by adding the following line. --- .devcontainer/on-create.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/on-create.sh b/.devcontainer/on-create.sh index 77f642c32b..8593f4568e 100755 --- a/.devcontainer/on-create.sh +++ b/.devcontainer/on-create.sh @@ -31,6 +31,9 @@ set -e +# Making the downloaded repository safe as the owner might differ for .devcontainer env. +git config --global --add safe.directory /workspaces/gem5 + # Refresh the git index. git update-index