From be030ce5a1921afe412f29d06c78ece4c5092a13 Mon Sep 17 00:00:00 2001 From: Nick Charlton Date: Wed, 20 Nov 2024 22:43:28 +0000 Subject: [PATCH] docker breaks the ownership --- bin/generate-database-schema | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/generate-database-schema b/bin/generate-database-schema index 843ecf575..1f3516e6a 100755 --- a/bin/generate-database-schema +++ b/bin/generate-database-schema @@ -10,6 +10,7 @@ run_in_container() { docker exec --workdir /app "$container_id" bash -c "$cmd" } +owner=$(whoami) # get ruby version from .ruby-version ruby_version="3.2.2" @@ -32,3 +33,6 @@ run_in_container "$container_id" "bundle exec rake db:setup" echo "Tidying up container..." docker stop "$container_id" > /dev/null docker rm "$container_id" > /dev/null + +echo "Restore file permissions..." +sudo chown -R "$owner" .