Skip to content

Commit 41e07ca

Browse files
bjornforoberpar
authored andcommitted
Tolerate CDPATH being set
If CDPATH is set, cd will print the path it enters, resulting in TOOLDIR containing the path twice, separated by a newline. Signed-off-by: Bjørn Forsman <[email protected]>
1 parent a3bbe8f commit 41e07ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/get_changes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Print lcov change log information as provided by Git
66

7-
TOOLDIR=$(cd $(dirname $0) ; pwd)
7+
TOOLDIR=$(cd $(dirname $0) >/dev/null ; pwd)
88

99
cd $TOOLDIR
1010

bin/get_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Print lcov version or release information as provided by Git, .version
66
# or a fallback.
77

8-
TOOLDIR=$(cd $(dirname $0) ; pwd)
8+
TOOLDIR=$(cd $(dirname $0) >/dev/null ; pwd)
99
GITVER=$(cd $TOOLDIR ; git describe --tags 2>/dev/null)
1010

1111
if [ -z "$GITVER" ] ; then

0 commit comments

Comments
 (0)