Skip to content

Commit

Permalink
Merge pull request #56 from rails/simplify-bundler-cache
Browse files Browse the repository at this point in the history
Simplify bundler cache feature
  • Loading branch information
andrewn617 authored Oct 4, 2024
2 parents e0a7118 + 073e4ba commit 54c5e33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
4 changes: 2 additions & 2 deletions features/bundler-cache/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "bundler-cache",
"version": "1.0.0",
"version": "1.0.1",
"name": "Bundler cache",
"description": "Creates a volume for persisting the installed gems across different containers",
"containerEnv": {
Expand All @@ -13,5 +13,5 @@
"type": "volume"
}
],
"postCreateCommand": "/usr/local/share/bundler-data-permissions.sh"
"postCreateCommand": "sudo chown -R ${USER} /bundle"
}
17 changes: 1 addition & 16 deletions features/bundler-cache/install.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
#!/bin/sh

set -e

USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"

POST_CREATE_COMMAND_SCRIPT_PATH="/usr/local/share/bundler-data-permissions.sh"

tee "$POST_CREATE_COMMAND_SCRIPT_PATH" > /dev/null \
<< EOF
#!/bin/sh
set -e
sudo chown -R ${USERNAME} /bundle
EOF

chmod 755 "$POST_CREATE_COMMAND_SCRIPT_PATH"
# This is a no op

0 comments on commit 54c5e33

Please sign in to comment.