Skip to content

Commit 1caced8

Browse files
Alex Eaglealexeagle
authored andcommitted
fix(docs): fix formatting of nodejs_binary#chdir
1 parent c31c0b6 commit 1caced8

File tree

3 files changed

+74
-64
lines changed

3 files changed

+74
-64
lines changed

docs/Built-ins.html

Lines changed: 30 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Built-ins.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -273,25 +273,27 @@ Runs some JavaScript code in NodeJS.
273273
<h4 id="nodejs_binary-chdir">chdir</h4>
274274

275275
(*String*): Working directory to run the binary or test in, relative to the workspace.
276-
By default, Bazel always runs in the workspace root.
277-
Due to implementation details, this argument must be underneath this package directory.
276+
By default, Bazel always runs in the workspace root.
277+
Due to implementation details, this argument must be underneath this package directory.
278278

279-
To run in the directory containing the `nodejs_binary` / `nodejs_test` use
280-
`chdir = package_name()`
281-
(or if you're in a macro, use `native.package_name()`)
282-
283-
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
284-
which are workspace-relative.
285-
You may need `../../` segments to re-relativize such paths to the new working directory.
279+
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use
280+
281+
chdir = package_name()
282+
283+
(or if you're in a macro, use `native.package_name()`)
284+
285+
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
286+
which are workspace-relative.
287+
You may need `../../` segments to re-relativize such paths to the new working directory.
286288

287289
Defaults to `""`
288290

289291
<h4 id="nodejs_binary-configuration_env_vars">configuration_env_vars</h4>
290292

291293
(*List of strings*): Pass these configuration environment variables to the resulting binary.
292-
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
293-
includes anything specified via the --define flag.
294-
Note, this can lead to different outputs produced by this rule.
294+
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
295+
includes anything specified via the --define flag.
296+
Note, this can lead to different outputs produced by this rule.
295297

296298
Defaults to `[]`
297299

@@ -513,25 +515,27 @@ remote debugger.
513515
<h4 id="nodejs_test-chdir">chdir</h4>
514516

515517
(*String*): Working directory to run the binary or test in, relative to the workspace.
516-
By default, Bazel always runs in the workspace root.
517-
Due to implementation details, this argument must be underneath this package directory.
518+
By default, Bazel always runs in the workspace root.
519+
Due to implementation details, this argument must be underneath this package directory.
518520

519-
To run in the directory containing the `nodejs_binary` / `nodejs_test` use
520-
`chdir = package_name()`
521-
(or if you're in a macro, use `native.package_name()`)
522-
523-
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
524-
which are workspace-relative.
525-
You may need `../../` segments to re-relativize such paths to the new working directory.
521+
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use
522+
523+
chdir = package_name()
524+
525+
(or if you're in a macro, use `native.package_name()`)
526+
527+
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
528+
which are workspace-relative.
529+
You may need `../../` segments to re-relativize such paths to the new working directory.
526530

527531
Defaults to `""`
528532

529533
<h4 id="nodejs_test-configuration_env_vars">configuration_env_vars</h4>
530534

531535
(*List of strings*): Pass these configuration environment variables to the resulting binary.
532-
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
533-
includes anything specified via the --define flag.
534-
Note, this can lead to different outputs produced by this rule.
536+
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
537+
includes anything specified via the --define flag.
538+
Note, this can lead to different outputs produced by this rule.
535539

536540
Defaults to `[]`
537541

internal/node/node.bzl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -344,23 +344,25 @@ fi
344344
_NODEJS_EXECUTABLE_ATTRS = {
345345
"chdir": attr.string(
346346
doc = """Working directory to run the binary or test in, relative to the workspace.
347-
By default, Bazel always runs in the workspace root.
348-
Due to implementation details, this argument must be underneath this package directory.
349-
350-
To run in the directory containing the `nodejs_binary` / `nodejs_test` use
351-
`chdir = package_name()`
352-
(or if you're in a macro, use `native.package_name()`)
353-
354-
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
355-
which are workspace-relative.
356-
You may need `../../` segments to re-relativize such paths to the new working directory.
357-
""",
347+
By default, Bazel always runs in the workspace root.
348+
Due to implementation details, this argument must be underneath this package directory.
349+
350+
To run in the directory containing the `nodejs_binary` / `nodejs_test`, use
351+
352+
chdir = package_name()
353+
354+
(or if you're in a macro, use `native.package_name()`)
355+
356+
WARNING: this will affect other paths passed to the program, either as arguments or in configuration files,
357+
which are workspace-relative.
358+
You may need `../../` segments to re-relativize such paths to the new working directory.
359+
""",
358360
),
359361
"configuration_env_vars": attr.string_list(
360362
doc = """Pass these configuration environment variables to the resulting binary.
361-
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
362-
includes anything specified via the --define flag.
363-
Note, this can lead to different outputs produced by this rule.""",
363+
Chooses a subset of the configuration environment variables (taken from `ctx.var`), which also
364+
includes anything specified via the --define flag.
365+
Note, this can lead to different outputs produced by this rule.""",
364366
default = [],
365367
),
366368
"data": attr.label_list(

0 commit comments

Comments
 (0)