Skip to content

Commit

Permalink
Update devcontainer-feature.json version to 0.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Apr 9, 2024
1 parent 213ec73 commit d1a67a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/alpine-gh-copilot-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-gh-copilot-cli",
"id": "alpine-gh-copilot-cli",
"version": "0.0.10",
"version": "0.0.11",
"description": "Installs Github Copilot CLI on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-gh-copilot-cli",
"installsAfter": [
Expand Down
6 changes: 4 additions & 2 deletions src/alpine-gh-copilot-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ npm i -g @githubnext/github-copilot-cli
if [[ $INITALIAS == "true" ]]; then
CURRENT_USER=$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)
echo "CURRENT_USER is $CURRENT_USER"

echo "_CONTAINER_USER_HOME is $_CONTAINER_USER_HOME"

if [[ -z $CURRENT_USER ]]; then
echo 'eval "$(github-copilot-cli alias -- "$0")"' >> $_CONTAINER_USER_HOME/.zshrc
else
su -c `echo 'eval "$(github-copilot-cli alias -- "$0")"' >> $_CONTAINER_USER_HOME/.zshrc` $CURRENT_USER
CMD="echo 'eval \"\$(github-copilot-cli alias -- \"\$0\")\"' >> \$_CONTAINER_USER_HOME/.zshrc"
su -c "$CMD" $CURRENT_USER
fi
fi

Expand Down

0 comments on commit d1a67a1

Please sign in to comment.