Skip to content

Commit

Permalink
fix: angular example ts_scripts path in Windows
Browse files Browse the repository at this point in the history
In Windows `_/ts_scripts.js` will be expanded to `C:/Program Files/Git/ts_scripts.js`.

```
[
  'C:\\users\\alag\\_bazel_alag\\rj2iva3m\\external\\build_bazel_rules_nodejs\\internal\\node\\_node_bin\\node',
  'C:\\users\\alag\\_bazel_alag\\rj2iva3m\\execroot\\examples_angular\\node_modules\\html-insert-assets\\src\\main.js',
  '--html=src/example/index.html',
  '--out=bazel-out/x64_windows-fastbuild/bin/src/index.html',
  '--roots=.',
  'bazel-out/x64_windows-fastbuild/bin/src',
  '--assets',
  'bazel-out/x64_windows-fastbuild/bin/src/styles.css',
  'external/npm/node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css',
  'external/npm/node_modules/zone.js/dist/zone.min.js',
  './_C:/Program Files/Git/ts_scripts.js'
]
```

This seems like some character escaping issue but in general escaping is hell and this is a more straightforward fix.

Partially addresses: #1604
  • Loading branch information
alan-agius4 authored and alexeagle committed Feb 5, 2020
1 parent db577fa commit 30d0f37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/angular/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ html_insert_assets(
"--assets",
] + ["$(execpath %s)" % s for s in _ASSETS] + [
# This file doesn't exist during the build, but will be served by ts_devserver
"_/ts_scripts.js",
"./_/ts_scripts.js",
],
data = ["//src:example/index.html"] + _ASSETS,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_view_engine/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ html_insert_assets(
"--assets",
] + ["$(execpath %s)" % s for s in _ASSETS] + [
# This file doesn't exist during the build, but will be served by ts_devserver
"_/ts_scripts.js",
"./_/ts_scripts.js",
],
data = ["//src:example/index.html"] + _ASSETS,
)
Expand Down

0 comments on commit 30d0f37

Please sign in to comment.