Skip to content

Commit 26fa3c6

Browse files
committed
use local install.sh in e2e tests
1 parent 38208e3 commit 26fa3c6

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

install.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ echo_standalone_postinstall() {
100100

101101
cath <<EOF
102102
103-
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME
103+
Coder has been installed to
104+
105+
$STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME
104106
105107
EOF
106108

@@ -114,7 +116,7 @@ Extend your path to use Coder:
114116
115117
EOF
116118
elif [ "$CODER_COMMAND" != "$STANDALONE_BINARY_LOCATION" ]; then
117-
echo_path_conflict "$CODER_COMMAND" "$STANDALONE_INSTALL_PREFIX"
119+
echo_path_conflict "$CODER_COMMAND"
118120
else
119121
cath <<EOF
120122
To run a Coder server:
@@ -135,16 +137,23 @@ echo_brew_postinstall() {
135137
return
136138
fi
137139

138-
CODER_COMMAND="$(command -v "coder")"
139140
BREW_PREFIX="$(brew --prefix)"
140141

142+
cath <<EOF
143+
144+
Coder has been installed to
145+
146+
$BREW_PREFIX/bin/coder
147+
148+
EOF
149+
150+
CODER_COMMAND="$(command -v "coder")"
151+
141152
if [ "$CODER_COMMAND" != "$BREW_PREFIX/bin/coder" ]; then
142153
echo_path_conflict "$CODER_COMMAND" "$BREW_PREFIX"
143154
fi
144155

145156
cath <<EOF
146-
Homebrew formula has been installed.
147-
148157
To run a Coder server:
149158
150159
$ coder server
@@ -199,6 +208,10 @@ There is another binary in your PATH that conflicts with the binary we've instal
199208
200209
$1
201210
211+
The binary that we just installed is located here:
212+
213+
$2
214+
202215
This is likely because of an existing installation of Coder. See our documentation for suggests on how to resolve this.
203216
204217
https://coder.com/docs/v2/latest/install/install.sh#path-conflicts

site/e2e/helpers.ts

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -263,30 +263,19 @@ export const downloadCoderVersion = async (
263263
return binaryPath;
264264
}
265265

266-
// Runs our public install script using our options to
267-
// install the binary!
266+
// Run our official install script to install the binary
268267
await new Promise<void>((resolve, reject) => {
269268
const cp = spawn(
270-
"sh",
269+
path.join(__dirname, "../../install.sh"),
271270
[
272-
"-c",
273-
[
274-
"curl",
275-
"-L",
276-
"https://coder.com/install.sh",
277-
"|",
278-
"sh",
279-
"-s",
280-
"--",
281-
"--version",
282-
version,
283-
"--method",
284-
"standalone",
285-
"--prefix",
286-
tempDir,
287-
"--binary-name",
288-
binaryName,
289-
].join(" "),
271+
"--version",
272+
version,
273+
"--method",
274+
"standalone",
275+
"--prefix",
276+
tempDir,
277+
"--binary-name",
278+
binaryName,
290279
],
291280
{
292281
env: {

0 commit comments

Comments
 (0)