Skip to content

Commit 1436560

Browse files
fix(coder/modules/mux): skipping post install scripts in mux (#556)
## Description Skip post install scripts when installing mux. ## Type of Change - Bug fix ## Module Information <!-- Delete this section if not applicable --> **Path:** `registry/coder/modules/mux` **New version:** `v1.0.1` **Breaking change:** No - [x] Tests pass (`bun test`) - [x] Code formatted (`bun fmt`) - [ ] Changes tested locally --------- Co-authored-by: DevCats <[email protected]>
1 parent 88a0ac8 commit 1436560

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

registry/coder/modules/mux/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Automatically install and run mux in a Coder workspace. By default, the module i
1414
module "mux" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/mux/coder"
17-
version = "1.0.0"
17+
version = "1.0.1"
1818
agent_id = coder_agent.example.id
1919
}
2020
```
@@ -35,7 +35,7 @@ module "mux" {
3535
module "mux" {
3636
count = data.coder_workspace.me.start_count
3737
source = "registry.coder.com/coder/mux/coder"
38-
version = "1.0.0"
38+
version = "1.0.1"
3939
agent_id = coder_agent.example.id
4040
}
4141
```
@@ -46,7 +46,7 @@ module "mux" {
4646
module "mux" {
4747
count = data.coder_workspace.me.start_count
4848
source = "registry.coder.com/coder/mux/coder"
49-
version = "1.0.0"
49+
version = "1.0.1"
5050
agent_id = coder_agent.example.id
5151
# Default is "latest"; set to a specific version to pin
5252
install_version = "0.4.0"
@@ -59,7 +59,7 @@ module "mux" {
5959
module "mux" {
6060
count = data.coder_workspace.me.start_count
6161
source = "registry.coder.com/coder/mux/coder"
62-
version = "1.0.0"
62+
version = "1.0.1"
6363
agent_id = coder_agent.example.id
6464
port = 8080
6565
}
@@ -73,7 +73,7 @@ Run an existing copy of mux if found, otherwise install from npm:
7373
module "mux" {
7474
count = data.coder_workspace.me.start_count
7575
source = "registry.coder.com/coder/mux/coder"
76-
version = "1.0.0"
76+
version = "1.0.1"
7777
agent_id = coder_agent.example.id
7878
use_cached = true
7979
}
@@ -87,7 +87,7 @@ Run without installing from the network (requires mux to be pre-installed):
8787
module "mux" {
8888
count = data.coder_workspace.me.start_count
8989
source = "registry.coder.com/coder/mux/coder"
90-
version = "1.0.0"
90+
version = "1.0.1"
9191
agent_id = coder_agent.example.id
9292
install = false
9393
}

registry/coder/modules/mux/main.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ describe("mux", async () => {
5555
expect(output.exitCode).toBe(0);
5656
const expectedLines = [
5757
"📦 Installing mux via npm into /tmp/mux...",
58+
"⏭️ Skipping npm lifecycle scripts with --ignore-scripts",
5859
"🥳 mux has been installed in /tmp/mux",
5960
"🚀 Starting mux server on port 4000...",
6061
"Check logs at /tmp/mux.log!",
6162
];
6263
for (const line of expectedLines) {
6364
expect(output.stdout).toContain(line);
6465
}
65-
}, 60000);
66+
}, 180000);
6667
});

registry/coder/modules/mux/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ if [ ! -f "$MUX_BINARY" ] || [ "${USE_CACHED}" != true ]; then
5050
if [ ! -f package.json ]; then
5151
echo '{}' > package.json
5252
fi
53+
echo "⏭️ Skipping npm lifecycle scripts with --ignore-scripts"
5354
PKG="mux"
5455
if [ -z "${VERSION}" ] || [ "${VERSION}" = "latest" ]; then
5556
PKG_SPEC="$PKG@latest"
5657
else
5758
PKG_SPEC="$PKG@${VERSION}"
5859
fi
59-
if ! npm install --no-audit --no-fund --omit=dev "$PKG_SPEC"; then
60+
if ! npm install --no-audit --no-fund --omit=dev --ignore-scripts "$PKG_SPEC"; then
6061
echo "❌ Failed to install mux via npm"
6162
exit 1
6263
fi

0 commit comments

Comments
 (0)