From 13ad6eea76e504fcfa6a462d877f13bb27f8d035 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 4 Dec 2024 22:46:33 +0000 Subject: [PATCH] Avoid a shell --- crate_universe/private/local_crate_mirror.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crate_universe/private/local_crate_mirror.bzl b/crate_universe/private/local_crate_mirror.bzl index b2d86718f5..4298e5d8b7 100644 --- a/crate_universe/private/local_crate_mirror.bzl +++ b/crate_universe/private/local_crate_mirror.bzl @@ -12,7 +12,10 @@ def _local_crate_mirror_impl(repository_ctx): generator, _generator_sha256 = get_generator(repository_ctx, host_triple.str) - execute(repository_ctx, ["bash", "-c", "cp -r {}/* {}/".format(path, repository_ctx.path("."))]) + # TODO: Work out why we can't just symlink here and actually copy. + # illicitonion thinks it may be that symlinks didn't get invalidated properly? + for child in repository_ctx.path(path).readdir(): + repository_ctx.execute(["cp", "-r", child, repository_ctx.path(child.basename)]) paths_to_track = execute(repository_ctx, ["find", path, "-type", "f"]).stdout.strip().split("\n") for path_to_track in paths_to_track: