Skip to content

Commit 8849aa7

Browse files
committed
test: don't clobber $PATH
BATS depends on `$PATH` somehow and if not handled properly, modifying `$PATH` breaks BATS badly. But, it doesn't seem like we have any reason to modify `$PATH` in the first place...so don't. test/svn: don't clobber `$PATH` test/ruby: don't clobber `$PATH` test/search: don't clobber `$PATH`
1 parent c2c7000 commit 8849aa7

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

test/lib/search.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function local_setup_file() {
77
}
88

99
function local_setup() {
10-
export PATH="/usr/bin:/bin:/usr/sbin"
1110
# shellcheck disable=SC2034
1211
BASH_IT_SEARCH_USE_COLOR=false
1312
}

test/plugins/ruby.plugin.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ function local_setup_file() {
66
setup_libs "helpers"
77
}
88

9-
function local_setup() {
10-
export PATH="/usr/bin:/bin:/usr/sbin"
11-
}
12-
139
@test "plugins ruby: remove_gem is defined" {
1410
run load "${BASH_IT?}/plugins/available/ruby.plugin.bash"
1511
assert_success

test/themes/base.theme.svn.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function setup_svn_path {
2424
assert_file_exist "$svn_path/svn"
2525

2626
# Make sure that the requested SVN script is on the path
27-
export PATH="$svn_path:/usr/bin:/bin:/usr/sbin"
27+
export PATH="$svn_path:$PATH"
2828
}
2929

3030
@test 'themes base: SVN: detect SVN repo' {

0 commit comments

Comments
 (0)