Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jul 4, 2019
1 parent a2f1e89 commit d1fbfd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/node/node_labels.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Labels are different on windows and linux/OSX.
"""

load("@build_bazel_rules_nodejs//internal/common:os_name.bzl", "os_name", "is_windows_os")
load("@build_bazel_rules_nodejs//internal/common:os_name.bzl", "is_windows_os", "os_name")

def get_node_label(rctx):
if is_windows_os(rctx):
Expand Down
15 changes: 8 additions & 7 deletions internal/node/node_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def _prepare_node(repository_ctx):
Args:
repository_ctx: The repository rule context
"""

# TODO: Maybe we want to encode the OS as a specific attribute rather than do it based on naming?
is_windows = is_windows_os(repository_ctx) or "_windows_" in repository_ctx.attr.name
if repository_ctx.attr.vendored_node:
Expand Down Expand Up @@ -454,13 +455,13 @@ alias(name = "node", actual = "{node_actual}")
alias(name = "npm", actual = "{npm_actual}")
alias(name = "yarn", actual = "{yarn_actual}")
""".format(
entry_ext = ".cmd" if is_windows else "",
exported_node_bin = ("\"%s\"," % node_exec_label) if repository_ctx.attr.vendored_node else "",
node_bin_actual = node_exec_label,
node_actual = node_entry,
npm_actual = npm_node_repositories_entry,
yarn_actual = yarn_node_repositories_entry,
))
entry_ext = ".cmd" if is_windows else "",
exported_node_bin = ("\"%s\"," % node_exec_label) if repository_ctx.attr.vendored_node else "",
node_bin_actual = node_exec_label,
node_actual = node_entry,
npm_actual = npm_node_repositories_entry,
yarn_actual = yarn_node_repositories_entry,
))

def _nodejs_repo_impl(repository_ctx):
_download_node(repository_ctx)
Expand Down

0 comments on commit d1fbfd3

Please sign in to comment.