forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade rules-nodes to version 3.5.0 (digital-asset#9635)
* Upgrade rules-nodes to version 3.4.2 No particularly strong reason for doing that. I just like staying up2date. changelog_begin changelog_end * Patch Windows changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end * . changelog_begin changelog_end
- Loading branch information
1 parent
a336363
commit cae4292
Showing
9 changed files
with
50 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl | ||
index 3c07b3a0..a7b77d9a 100644 | ||
--- a/internal/npm_install/npm_install.bzl | ||
+++ b/internal/npm_install/npm_install.bzl | ||
@@ -335,8 +335,9 @@ def _copy_file(repository_ctx, f): | ||
to_segments = to.split("/") | ||
if len(to_segments) > 1: | ||
dirname = "/".join(to_segments[:-1]) | ||
+ args = ["mkdir", "-p", dirname] if not is_windows_os(repository_ctx) else ["cmd", "/c", "if not exist {dir} mkdir {dir}".format(dir = dirname)] | ||
result = repository_ctx.execute( | ||
- ["mkdir", "-p", dirname], | ||
+ args, | ||
quiet = repository_ctx.attr.quiet, | ||
) | ||
if result.return_code: | ||
@@ -344,12 +345,13 @@ def _copy_file(repository_ctx, f): | ||
|
||
# copy the file; don't use the repository_ctx.template trick with empty substitution as this | ||
# does not copy over binary files properly | ||
+ cp_args = ["cp", "-f", repository_ctx.path(f), to] if not is_windows_os(repository_ctx) else ["cmd", "/c", "copy /y {} {}".format("\\".join(str(repository_ctx.path(f)).split("/")), "\\".join(to_segments))] | ||
result = repository_ctx.execute( | ||
- ["cp", "-f", repository_ctx.path(f), to], | ||
+ cp_args, | ||
quiet = repository_ctx.attr.quiet, | ||
) | ||
if result.return_code: | ||
- fail("cp -f %s %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (repository_ctx.path(f), to, result.stdout, result.stderr)) | ||
+ fail("cp -f {} {} failed: \nSTDOUT:\n{}\nSTDERR:\n{}, {}".format(repository_ctx.path(f), to, result.stdout, result.stderr, cp_args)) | ||
|
||
def _symlink_file(repository_ctx, f): | ||
repository_ctx.symlink(f, _workspace_root_path(repository_ctx, f)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters