From 073e4ba2002b7959c2eb00968ab40ec8946392d4 Mon Sep 17 00:00:00 2001 From: Andrew Novoselac Date: Fri, 4 Oct 2024 10:36:20 -0400 Subject: [PATCH] Simplify bundler cache feature by calling chown inline in postCreateCommand --- .../bundler-cache/devcontainer-feature.json | 4 ++-- features/bundler-cache/install.sh | 17 +---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/features/bundler-cache/devcontainer-feature.json b/features/bundler-cache/devcontainer-feature.json index b1df7b3..e1dcf33 100644 --- a/features/bundler-cache/devcontainer-feature.json +++ b/features/bundler-cache/devcontainer-feature.json @@ -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": { @@ -13,5 +13,5 @@ "type": "volume" } ], - "postCreateCommand": "/usr/local/share/bundler-data-permissions.sh" + "postCreateCommand": "sudo chown -R ${USER} /bundle" } diff --git a/features/bundler-cache/install.sh b/features/bundler-cache/install.sh index d53017f..81df2a6 100644 --- a/features/bundler-cache/install.sh +++ b/features/bundler-cache/install.sh @@ -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