Date: Fri, 1 Jun 2018 16:20:48 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r471272 - head/Mk/Scripts Message-ID: <201806011620.w51GKmJu004402@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Fri Jun 1 16:20:48 2018 New Revision: 471272 URL: https://svnweb.freebsd.org/changeset/ports/471272 Log: SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. cd can fail for a variety of reasons: misspelled paths, missing directories, missing permissions, broken symlinks and more. If/when it does, the script will keep going and do all its operations in the wrong directory. This can be messy, especially if the operations involve creating or deleting a lot of files. PR: 227109 Submitted by: mat Sponsored by: Absolight Modified: head/Mk/Scripts/qa.sh (contents, props changed) Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Fri Jun 1 16:20:45 2018 (r471271) +++ head/Mk/Scripts/qa.sh Fri Jun 1 16:20:48 2018 (r471272) @@ -920,7 +920,7 @@ checks="$checks suidfiles libtool libperl prefixvar ba checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors" ret=0 -cd ${STAGEDIR} +cd ${STAGEDIR} || exit 1 for check in ${checks}; do ${check} || ret=1 done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806011620.w51GKmJu004402>