Skip to content

Commit a396263

Browse files
committed
improve error logging, ensure .nvm dir doesn't exist
Signed-off-by: Jeffrey Sica <me@jeefy.dev>
1 parent 151d631 commit a396263

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/cloudrunners/oci/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func run(cmd *cobra.Command, argv []string) error {
142142
commands := []string{
143143
"tar -zxf /opt/runner-cache/actions-runner-linux-*.tar.gz",
144144
"rm -rf \\$HOME",
145-
"mkdir -p ~/.nvm",
145+
"rm -rf ~/.nvm",
146146
"wget -O nvm-install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh",
147147
"bash nvm-install.sh",
148148
`sudo usermod -aG docker ubuntu && newgrp docker <<EOF
@@ -158,7 +158,7 @@ EOF`,
158158

159159
output, err := sshClient.RunCommand(ctx, expanded)
160160
if err != nil {
161-
log.Println(err, "running ssh command", "command", cmd, "output", output)
161+
log.Println(err, "running ssh command", "command", cmd, "output", string(output[:]))
162162
return fmt.Errorf("running command %q: %w", cmd, err)
163163
}
164164
log.Println("command succeeded", "command", cmd, "output", string(output))

0 commit comments

Comments
 (0)