Skip to content

Commit

Permalink
Revert to postCreateCommand as updateContentCommand offered nothing
Browse files Browse the repository at this point in the history
It still ran as the remoteUser (devcontainers/spec#60 (comment))
  • Loading branch information
MiguelRodo authored Nov 18, 2024
1 parent 1195eb2 commit 2fbefb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/repos/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "Add commands to work with repos",
"id": "repos",
"version": "1.5.3",
"version": "1.5.4",
"description": "Add commands to work with multiple repos",
"updateContentCommand": "/usr/local/bin/repos-update-content",
"postCreateCommand": "/usr/local/bin/repos-post-create",
"postStartCommand": "/usr/local/bin/repos-post-start",
"options": {
Expand Down
10 changes: 1 addition & 9 deletions src/repos/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,18 @@ source scripts/shellrc-config.sh
# ---------------------

# Paths to the command files
PATH_UPDATE_CONTENT_COMMAND=/usr/local/bin/repos-update-content
PATH_POST_CREATE_COMMAND=/usr/local/bin/repos-post-create
PATH_START_CREATE_COMMAND=/usr/local/bin/repos-post-start

# Initialize the command files
initialize_command_file "$PATH_UPDATE_CONTENT_COMMAND"
initialize_command_file "$PATH_POST_CREATE_COMMAND"
initialize_command_file "$PATH_START_CREATE_COMMAND"

# Add commands

# update-content
append_command_with_error_handling \
"/usr/local/bin/repos-git-auth --scope system" "$PATH_UPDATE_CONTENT_COMMAND"

# post-create
append_command_with_error_handling \
"/usr/local/bin/repos-workspace-add" "$PATH_POST_CREATE_COMMAND"
append_command_with_error_handling \
"/usr/local/bin/repos-git-clone" "$PATH_POST_CREATE_COMMAND"
'if [ "$(id -u)" -eq 0 ]; then /usr/local/bin/repos-git-auth --scope system; fi' "$PATH_POST_CREATE_COMMAND"

# post-start
append_command_with_error_handling \
Expand Down

0 comments on commit 2fbefb6

Please sign in to comment.