Skip to content

Commit 0b6c6ce

Browse files
committed
Prevent permissions issues with copying from store
Copying from the nix store can cause some issues.
1 parent 59b4566 commit 0b6c6ce

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

integration-tests/wordpress.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -euo pipefail
44

5+
TMPDIR=$(mktemp -d)
6+
rsync -a --copy-links --no-perms --no-owner --no-group "$WORDPRESS_PATH"/share/wordpress "$TMPDIR"
7+
chown -R "$USER:$USER" "$TMPDIR"
8+
chattr -R -i -a "$TMPDIR"
9+
chmod ugo+w -R "$TMPDIR"
510
rm -rf wordpress
6-
cp -r "$WORDPRESS_PATH"/share/wordpress .
7-
chmod +w -R wordpress
11+
mv -f "$TMPDIR"/wordpress .
12+
rmdir "$TMPDIR"
813

914
while ! test -S "mariadb/data/mysql.sock"; do
1015
sleep 1

0 commit comments

Comments
 (0)