Skip to content

Commit 7f6972f

Browse files
devversionjelbourn
authored andcommitted
build: fix bazel devserver not launching (#17160)
The custom devserver implementation does currently not work due to a breaking change in the `rules_nodejs` repo. Apparently a `nodejs_binary` no longer generates an executable output without either `.bat` or `.sh`. This is something we relied on in the devserver launcher script. The fix is as simple as resolving the executable with `.sh` extension as we run the devserver launcher from within a `sh_binary` already.
1 parent f537fba commit 7f6972f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/dev-server/launcher_template.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ if [[ ! -z "RUNFILES_DIR" ]]; then
1818
export RUNFILES_MANIFEST_ONLY="1"
1919
fi
2020

21-
# Resolve the path of the dev-server binary.
22-
devserverBin=$(rlocation "angular_material/tools/dev-server/dev-server_bin")
21+
# Resolve the path of the dev-server binary. Note: usually we either need to
22+
# resolve the "nodejs_binary" executable with different file extensions on
23+
# windows, but since we already run this launcher as part of a "sh_binary", we
24+
# can safely execute another shell script from the current shell.
25+
devserverBin=$(rlocation "angular_material/tools/dev-server/dev-server_bin.sh")
2326

2427
# Start the devserver with the given arguments. The arguments will be
2528
# substituted based on the rule attributes.

0 commit comments

Comments
 (0)