Skip to content

Commit 35131fc

Browse files
committed
fix(bazel): use RUNFILES in http_server
This is necessary because `RUNFILES_DIR` is only set in tests by Bazel, while `RUNFILES` itself is set by the `rules_js` launcher and is therefore more available.
1 parent c4f7d3c commit 35131fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bazel/http-server/server.mts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import send from 'send';
1414
import assert from 'node:assert';
1515

1616
// The current working directory is the runfiles root.
17-
const runfilesRoot = process.env['RUNFILES_DIR']!;
18-
assert(runfilesRoot, 'Expected `RUNFILES_DIR` to be set.');
17+
const runfilesRoot = process.env['RUNFILES']!;
18+
assert(runfilesRoot, 'Expected `RUNFILES` to be set.');
1919

2020
/**
2121
* Http Server implementation that uses browser-sync internally. This server

0 commit comments

Comments
 (0)