aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer
diff options
context:
space:
mode:
authorRobin Windey <ro.windey@gmail.com>2023-08-27 15:33:01 +0000
committerGitHub <noreply@github.com>2023-10-13 16:18:57 +0000
commit9dd158b70de7d6c962d58d06268125932cab5075 (patch)
treed138f6ff343ce80bbd698e2a943e016a81e60175 /.devcontainer
parentcdc2f38a511a2665951f6eb8056d6077f70151ed (diff)
downloadnextcloud-server-9dd158b70de7d6c962d58d06268125932cab5075.tar.gz
nextcloud-server-9dd158b70de7d6c962d58d06268125932cab5075.zip
Devcontainer: move git setup to postStartCommand
* postCreateCommand is executed too early * If git config commands run in postCreate, a global .gitconfig will be created * Copy of local .gitconfig will be skipped if .gitconfig already exists in container * Move to later stage * https://github.com/devcontainers/cli/issues/98 * https://github.com/microsoft/vscode-remote-release/issues/4855#issuecomment-831920085 Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to '.devcontainer')
-rw-r--r--.devcontainer/devcontainer.json1
-rwxr-xr-x.devcontainer/postStart.sh5
-rwxr-xr-x.devcontainer/setup.sh4
3 files changed, 6 insertions, 4 deletions
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 3fb1bf42e44..612b99fdcdd 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -3,6 +3,7 @@
"dockerComposeFile": "docker-compose.yml",
"service": "nextclouddev",
"postCreateCommand": ".devcontainer/setup.sh",
+ "postStartCommand": ".devcontainer/postStart.sh",
"forwardPorts": [
80,
8080,
diff --git a/.devcontainer/postStart.sh b/.devcontainer/postStart.sh
new file mode 100755
index 00000000000..20657a15a94
--- /dev/null
+++ b/.devcontainer/postStart.sh
@@ -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 \ No newline at end of file
diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
index 3485d4f7257..11bee7175b7 100755
--- a/.devcontainer/setup.sh
+++ b/.devcontainer/setup.sh
@@ -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