File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,14 @@ dirs=`echo "$targets" | sed -e 's/\/\/src\/\(.*\):npm_package/\1/'`
43
43
# a workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1219. We need to
44
44
# do this to ensure that the version placeholders are properly populated.
45
45
for pkg in ${dirs} ; do
46
- pkg_dir=" ${bazel_bin_path} /src/${pkg} /npm_package"
47
- rm -Rf ${pkg_dir}
46
+ if [[ -d ${pkg} ]]; then
47
+ pkg_dir=" ${bazel_bin_path} /src/${pkg} /npm_package"
48
+ # Make all directories in the previous package output writable. Bazel by default
49
+ # makes tree artifacts and file outputs readonly. This causes permission errors
50
+ # when deleting the folder. To avoid these errors, we make all files writable.
51
+ chmod -R u+w ${pkg_dir}
52
+ rm -Rf ${pkg_dir}
53
+ fi
48
54
done
49
55
50
56
# Walk through each release package target and build it.
You can’t perform that action at this time.
0 commit comments