Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Unset CDPATH to prevent weird problems #119

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libexec/bats
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash
set -e
if [ ! -z "$CDPATH" -a -z "$BATS_KEEP_CDPATH" ]; then
echo "Unsetting CDPATH to prevent problems like https://github.com/sstephenson/bats/issues/104 ..."
echo "To suppress this behavior, set BATS_KEEP_CDPATH"
echo "You may want to consider not exporting CDPATH"
unset CDPATH
fi

version() {
echo "Bats 0.4.0"
Expand Down