File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,10 @@ export CODER_AGENT_AUTH="${AUTH_TYPE}"
33
33
export CODER_AGENT_URL=" ${ACCESS_URL} "
34
34
35
35
output=$( ./${BINARY_NAME} --version | head -n1)
36
- echo " ${output} " | grep -q Coder
37
- if [ $? -ne 0 ] ; then
38
- echo >&2 " ERROR: Downloaded agent binary is invalid"
39
- echo >&2 " Script output: '${output} '"
40
- exit 2
36
+ if ! echo " ${output} " | grep -q Coder; then
37
+ echo >&2 " ERROR: Downloaded agent binary is invalid"
38
+ echo >&2 " Script output: '${output} '"
39
+ exit 2
41
40
fi
42
41
43
42
exec ./${BINARY_NAME} agent
Original file line number Diff line number Diff line change @@ -88,11 +88,10 @@ export CODER_AGENT_AUTH="${AUTH_TYPE}"
88
88
export CODER_AGENT_URL=" ${ACCESS_URL} "
89
89
90
90
output=$( ./${BINARY_NAME} --version | head -n1)
91
- echo " ${output} " | grep -q Coder
92
- if [ $? -ne 0 ] ; then
93
- echo >&2 " ERROR: Downloaded agent binary is invalid"
94
- echo >&2 " Script output: '${output} '"
95
- exit 2
91
+ if ! echo " ${output} " | grep -q Coder; then
92
+ echo >&2 " ERROR: Downloaded agent binary is invalid"
93
+ echo >&2 " Script output: '${output} '"
94
+ exit 2
96
95
fi
97
96
98
97
exec ./${BINARY_NAME} agent
You can’t perform that action at this time.
0 commit comments