Commit 624e8ac 1 parent fea9515 commit 624e8ac Copy full SHA for 624e8ac
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,8 @@ out={out_path}
219
219
mkdir -p "$(dirname "$out")"
220
220
if [[ -f "$in" ]]; then
221
221
echo "Copying file $in to $out in $PWD"
222
+ # in case `cp` from previous command was terminated midway which can result in read-only files/dirs
223
+ chmod -R ug+w "$out" > /dev/null 2>&1 || true
222
224
rm -Rf "$out"
223
225
cp -f "$in" "$out"
224
226
# cp should make the file writable but call chmod anyway as a defense in depth
@@ -227,6 +229,8 @@ if [[ -f "$in" ]]; then
227
229
{executable_file}
228
230
else
229
231
echo "Copying directory $in to $out in $PWD"
232
+ # in case `cp` from previous command was terminated midway which can result in read-only files/dirs
233
+ chmod -R ug+w "$out" > /dev/null 2>&1 || true
230
234
rm -Rf "$out"/*
231
235
mkdir -p "$out"
232
236
cp -fRL "$in"/* "$out"
You can’t perform that action at this time.
0 commit comments