@@ -119,15 +119,15 @@ resource "coder_script" "claude_code" {
119119 install_tmux() {
120120 echo "Installing tmux..."
121121 if command_exists apt-get; then
122- apt-get update && apt-get install -y tmux
122+ sudo apt-get update && sudo apt-get install -y tmux
123123 elif command_exists yum; then
124- yum install -y tmux
124+ sudo yum install -y tmux
125125 elif command_exists dnf; then
126- dnf install -y tmux
126+ sudo dnf install -y tmux
127127 elif command_exists pacman; then
128- pacman -S --noconfirm tmux
128+ sudo pacman -S --noconfirm tmux
129129 elif command_exists apk; then
130- apk add tmux
130+ sudo apk add tmux
131131 else
132132 echo "Error: Unable to install tmux automatically. Package manager not recognized."
133133 exit 1
@@ -227,15 +227,15 @@ resource "coder_script" "claude_code" {
227227 if ! command_exists git; then
228228 echo "Git not found, installing git..."
229229 if command_exists apt-get; then
230- apt-get update && apt-get install -y git
230+ sudo apt-get update && sudo apt-get install -y git
231231 elif command_exists yum; then
232- yum install -y git
232+ sudo yum install -y git
233233 elif command_exists dnf; then
234- dnf install -y git
234+ sudo dnf install -y git
235235 elif command_exists pacman; then
236- pacman -S --noconfirm git
236+ sudo pacman -S --noconfirm git
237237 elif command_exists apk; then
238- apk add git
238+ sudo apk add git
239239 else
240240 echo "Error: Unable to install git automatically. Package manager not recognized."
241241 echo "Please install git manually to enable session persistence."
0 commit comments