Skip to content

Commit 5afe013

Browse files
authored
Use mkdir instead of tar to lock the erlang install directory (#242)
Use mkdir instead of tar to lock the erlang install directory when using bazel built erlang
1 parent 122831a commit 5afe013

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/erlang_toolchain.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ def maybe_install_erlang(ctx, short_path = False):
5858
return ""
5959
else:
6060
return """\
61-
if [[ ! -d "{erlang_home}" ]]; then
61+
mkdir -p $(dirname "{erlang_home}")
62+
if mkdir "{erlang_home}"; then
6263
tar --extract \\
6364
--directory / \\
64-
--file {release_tar} || test -d "{erlang_home}"
65+
--file {release_tar}
6566
fi""".format(
6667
release_tar = release_dir_tar.short_path if short_path else release_dir_tar.path,
6768
erlang_home = info.erlang_home,

0 commit comments

Comments
 (0)