Always call `cd "$WORKDIR"` to ensure that $CWD is sane whenever possible.
authorZac Medico <zmedico@gentoo.org>
Sun, 21 Sep 2008 15:50:08 +0000 (15:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 21 Sep 2008 15:50:08 +0000 (15:50 -0000)
svn path=/main/trunk/; revision=11530

bin/ebuild.sh

index 2d87d404ab624983dc58308886d7f012c1e43bb8..e0b63d9f1b7a45294985edd7820f0114451d6d47 100755 (executable)
@@ -272,6 +272,9 @@ register_die_hook() {
        export EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} $*"
 }
 
+# Ensure that $CWD is sane whenever possible.
+cd "$WORKDIR" 2>/dev/null
+
 #if no perms are specified, dirs/files will have decent defaults
 #(not secretive, but not stupid)
 umask 022