diff --git a/xbps-src b/xbps-src index 65c45ada56..91ab57850e 100755 --- a/xbps-src +++ b/xbps-src @@ -716,7 +716,8 @@ case "$XBPS_TARGET" in remove_pkg_autodeps fi msg_normal "xbps-src: cleaning up masterdir...\n" - chmod -R +wX $XBPS_MASTERDIR/builddir # Needed to remove Go Modules + # Needed to remove Go Modules + [ -d $XBPS_MASTERDIR/builddir ] && chmod -R +wX $XBPS_MASTERDIR/builddir rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir rm -f $XBPS_MASTERDIR/tmp/* >/dev/null 2>&1 else