Skip to content

Commit

Permalink
Merge pull request #40068 from nextcloud/devcontainer-fix-git-config
Browse files Browse the repository at this point in the history
[Devcontainer] move git setup to postStartCommand
  • Loading branch information
susnux authored Oct 15, 2023
2 parents f07709c + 9dd158b commit ca946e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"dockerComposeFile": "docker-compose.yml",
"service": "nextclouddev",
"postCreateCommand": ".devcontainer/setup.sh",
"postStartCommand": ".devcontainer/postStart.sh",
"forwardPorts": [
80,
8080,
Expand Down
5 changes: 5 additions & 0 deletions .devcontainer/postStart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Set git safe.directory
git config --global --add safe.directory /var/www/html
git config --global --add safe.directory /var/www/html/3rdparty
4 changes: 0 additions & 4 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"

cd $DIR/

# Set git safe.directory
git config --global --add safe.directory /var/www/html
git config --global --add safe.directory /var/www/html/3rdparty

git submodule update --init

# Codespace config
Expand Down

0 comments on commit ca946e7

Please sign in to comment.