Skip to content

Commit

Permalink
fix(typescript): fix bug in ts_project (write_tsconfig_rule) when ext…
Browse files Browse the repository at this point in the history
…ending from a generated tsconfig in same folder
  • Loading branch information
gregmagolan committed Jul 16, 2021
1 parent 398d351 commit 4e396eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/typescript/internal/ts_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def _relative_path(tsconfig, dest):
# So we can calculate a relative path from e.g.
# bazel-out/darwin-fastbuild/bin/packages/typescript/test/ts_project/generated_tsconfig/gen_src
# to <generated file packages/typescript/test/ts_project/generated_tsconfig/gen_src/subdir/a.ts>
return dest.path[len(relative_to) + 1:]
result = dest.path[len(relative_to) + 1:]
if not result.startswith("."):
result = "./" + result
return result

def _write_tsconfig_rule(ctx):
# TODO: is it useful to expand Make variables in the content?
Expand Down

0 comments on commit 4e396eb

Please sign in to comment.