Skip to content

Commit 605b4ae

Browse files
committed
refactor: Ensure all MCSha block commands run as ubuntu user
1 parent 891d00f commit 605b4ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cloudformation-template/unity-mc.main.template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ Resources:
478478
&& echo "requested sha: ${MCSha}" \
479479
&& { \
480480
if [ "${MCSha}" != "" ]; then \
481-
sudo -i -u ubuntu git clone https://github.com/unity-sds/unity-management-console.git \
481+
sudo -i -u ubuntu bash -c 'git clone https://github.com/unity-sds/unity-management-console.git \
482482
&& cd /home/ubuntu/unity-management-console \
483-
&& sudo -i -u ubuntu git checkout ${MCSha} \
483+
&& git checkout ${MCSha} \
484484
&& cd /home/ubuntu/ \
485485
&& wget https://go.dev/dl/go1.20.14.linux-amd64.tar.gz \
486486
&& tar xfvz go1.20.14.linux-amd64.tar.gz \
@@ -489,7 +489,7 @@ Resources:
489489
&& export PATH=$(pwd)/go/bin:$PATH \
490490
&& go build -buildvcs=false -o ./main ./backend/cmd/web \
491491
&& chmod +x main \
492-
&& cp main ../management-console/main; \
492+
&& cp main ../management-console/main'; \
493493
elif [ "${MCVersion}" = "latest" ]; then \
494494
sudo -i -u ubuntu wget -q -O managementconsole.zip "https://github.com/unity-sds/unity-management-console/releases/latest/download/managementconsole.zip" \
495495
&& sudo -i -u ubuntu unzip managementconsole.zip; \

0 commit comments

Comments
 (0)