File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ export BPM_ORIGIN_DIR="$BPM_TEST_DIR/origin"
18
18
export BPM_IS_TEST=
19
19
20
20
# Stub common variables
21
+ test_util.get_repo_root
22
+ export BPM_ROOT=" ${REPLY%/* } "
21
23
export PROGRAM_LIB_DIR=" $BPM_ROOT /source/pkg/lib"
22
- test_util.get_bpm_root
23
- export BPM_ROOT=" $REPLY "
24
24
export BPM_PREFIX=" $BPM_TEST_DIR /cellar"
25
25
export BPM_PACKAGES_PATH=" $BPM_PREFIX /packages"
26
26
export BPM_INSTALL_BIN=" $BPM_PREFIX /bin"
27
27
export BPM_INSTALL_MAN=" $BPM_PREFIX /man"
28
28
export BPM_INSTALL_COMPLETIONS=" $BPM_PREFIX /completions"
29
- export BPM_MODE=' global' # normal default is 'local'
29
+ export BPM_MODE=' global' # for non-tests, the default is 'local'
30
30
31
31
export PATH=" $BPM_ROOT /source/pkg/bin:$PATH "
32
32
for f in " $BPM_ROOT " /source/pkg/lib/{commands,util}/?* .sh; do
Original file line number Diff line number Diff line change 1
1
# shellcheck shell=bash
2
2
# shellcheck disable=SC2164
3
3
4
- test_util.get_bpm_root () {
4
+ test_util.get_repo_root () {
5
5
REPLY=
6
6
if ! REPLY=" $(
7
7
while [[ ! -d " .git" && " $PWD " != / ]]; do
@@ -16,12 +16,6 @@ test_util.get_bpm_root() {
16
16
exit 1
17
17
fi
18
18
19
- # BPM root is the parent directory of 'source', which holds
20
- # the Git repository
21
- if ! cd ..; then
22
- printf " %s\n" " Error: Could not cd to BPM directory" >&2
23
- exit 1
24
- fi
25
19
printf " %s" " $PWD "
26
20
) " ; then
27
21
exit 1
You can’t perform that action at this time.
0 commit comments