Skip to content

Commit ff3fafc

Browse files
committed
Fix if statement structure in update script and variable reference (#3956)
1 parent f54fe81 commit ff3fafc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Misc/layoutbin/update.sh.template

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fi
123123
# fix upgrade issue with macOS when running as a service
124124
attemptedtargetedfix=0
125125
currentplatform=$(uname | awk '{print tolower($0)}')
126-
if [[ "$currentplatform" == 'darwin' && restartinteractiverunner -eq 0 ]]; then
126+
if [[ "$currentplatform" == 'darwin' && $restartinteractiverunner -eq 0 ]]; then
127127
# We needed a fix for https://github.com/actions/runner/issues/743
128128
# We will recreate the ./externals/nodeXY/bin/node of the past runner version that launched the runnerlistener service
129129
# Otherwise mac gatekeeper kills the processes we spawn on creation as we are running a process with no backing file
@@ -146,10 +146,11 @@ if [[ "$currentplatform" == 'darwin' && restartinteractiverunner -eq 0 ]]; then
146146
then
147147
nodever="node16"
148148
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
149-
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
150-
then
151-
nodever="node12"
152-
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
149+
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
150+
then
151+
nodever="node12"
152+
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
153+
fi
153154
fi
154155
fi
155156
if [[ $? -eq 0 && -n "$path" ]]

0 commit comments

Comments
 (0)