Skip to content

Commit 350dada

Browse files
stepanchegfacebook-github-bot
authored andcommitted
.relative_to() -> relative_to=
Reviewed By: JakobDegen Differential Revision: D58844563 fbshipit-source-id: cf31904b441c89ae7a1de3e625d8e51a055daf5c
1 parent db7cf74 commit 350dada

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/no_prelude/toolchains/go_toolchain.bzl

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ def _go_toolchain_impl(ctx):
1717

1818
cmd = cmd_args()
1919
if host_info().os.is_windows:
20-
compiler_src = cmd_args(download, format = "{}\\go\\bin\\go.exe")
21-
cmd.add([ctx.attrs._symlink_bat, compiler_dst.as_output(), compiler_src.relative_to(compiler_dst, parent = 1)])
20+
compiler_src = cmd_args(download, format = "{}\\go\\bin\\go.exe", relative_to = (compiler_dst, 1))
21+
cmd.add([ctx.attrs._symlink_bat, compiler_dst.as_output(), compiler_src])
2222
else:
23-
compiler_src = cmd_args(download, format = "{}/go/bin/go")
24-
cmd.add(["ln", "-sf", compiler_src.relative_to(compiler_dst, parent = 1), compiler_dst.as_output()])
23+
compiler_src = cmd_args(download, format = "{}/go/bin/go", relative_to = (compiler_dst, 1))
24+
cmd.add(["ln", "-sf", compiler_src, compiler_dst.as_output()])
2525

2626
ctx.actions.run(cmd, category = "cp_compiler")
2727
return [DefaultInfo(default_output = download), GoCompilerInfo(compiler_path = compiler_dst, GOROOT = "")]
@@ -60,12 +60,12 @@ def _download_toolchain(ctx: AnalysisContext):
6060
if host_info().os.is_windows:
6161
script_content.extend([
6262
cmd_args(output, format = "cd {}"),
63-
cmd_args(["unzip", archive], delimiter = " ").relative_to(output),
63+
cmd_args(["unzip", archive], delimiter = " ", relative_to = output),
6464
])
6565
else:
6666
script_content.extend([
6767
cmd_args(output, format = "cd {}"),
68-
cmd_args(["tar", compress_flag, "-x", "-f", archive], delimiter = " ").relative_to(output),
68+
cmd_args(["tar", compress_flag, "-x", "-f", archive], delimiter = " ", relative_to = output),
6969
])
7070
script, _ = ctx.actions.write(
7171
script_name,

0 commit comments

Comments
 (0)