Skip to content

Commit d163c3b

Browse files
committed
Use multiline-string for the shell command to be executed in the container, to improve readability
1 parent d21d886 commit d163c3b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

components/gitpod-cli/cmd/rebuild.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,19 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie
187187
"-it", tag,
188188
"/bin/sh",
189189
"-c",
190-
fmt.Sprintf("echo \"%s\"; cd \"%s\"; if [ -x \"$(command -v /bin/bash)\" ]; then if [ -x \"$(command -v $SHELL)\" ]; then $SHELL; else /bin/bash; fi; else /bin/sh; fi", welcomeMessage, wsInfo.CheckoutLocation),
190+
fmt.Sprintf(`
191+
echo "%s";
192+
cd "%s";
193+
if [ -x "$(command -v /bin/bash)" ]; then
194+
if [ -x "$(command -v $SHELL)" ]; then
195+
$SHELL;
196+
else
197+
/bin/bash;
198+
fi;
199+
else
200+
/bin/sh;
201+
fi
202+
`, welcomeMessage, wsInfo.CheckoutLocation),
191203
)
192204

193205
dockerRunCmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)