Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
Merge pull request #137 from jcbhmr/patch-1
Browse files Browse the repository at this point in the history
Fix user account switching issue
  • Loading branch information
danielbraun89 authored Nov 29, 2022
2 parents dc81489 + db0f7d8 commit 908892e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pulumi/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ sudo -iu "$_REMOTE_USER" <<EOF
# if pulumi script failed to insert to path, fallback to soft linking it in /usr/local/bin
exec $SHELL
if ! [ -x "$(command -v pulumi)" ]; then
ln -s \$HOME/.pulumi/bin/pulumi /usr/local/bin/pulumi
if ! [ -x "\$(command -v pulumi)" ]; then
# We need sudo here since we are running under \$_REMOTE_USER
sudo ln -s \$HOME/.pulumi/bin/pulumi /usr/local/bin/pulumi
fi
# finally we are adding bash completion. zsh support will be added soon
if [[ "${BASH_COMPLETION}" = "true" ]] ; then
pulumi gen-completion bash > /etc/bash_completion.d/pulumi
# We need sudo here since we are running under \$_REMOTE_USER
sudo pulumi gen-completion bash > /etc/bash_completion.d/pulumi
fi
EOF

Expand Down

0 comments on commit 908892e

Please sign in to comment.