generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ownership of
$RENV_PATHS_CACHE
to correct uid on `postStartC…
…ommand` (#210) Closes #209 Updates the ownership of the `$RENV_PATHS_CACHE` directory such that when `updateRemoteUserUID` is set, the ownership of the cache is the same as the workspace. The test cases have also been updated to check the permissions of the directory.
- Loading branch information
Showing
8 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
RENV_PATHS_CACHE=${RENV_PATHS_CACHE:-"/renv/cache"} | ||
|
||
set -e | ||
|
||
fix_permissions() { | ||
local dir | ||
dir="${1}" | ||
|
||
if [ ! -w "${dir}" ]; then | ||
echo "Fixing permissions of '${dir}'..." | ||
sudo chown -R "$(id -u):$(id -g)" "${dir}" | ||
echo "Done!" | ||
else | ||
echo "Permissions of '${dir}' are OK!" | ||
fi | ||
} | ||
|
||
fix_permissions "${RENV_PATHS_CACHE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters