File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ BAKE_LOG_LEVEL="${BAKE_LOG_LEVEL:-$BAKE_LOG_LEVEL_INFO}"
3434#
3535# The list of directories that bake will search when resolving libraries (via require)
3636#
37- BAKEPATH=" ${BAKEPATH:- .} "
37+ BAKEPATH=${BAKEPATH: + $BAKEPATH : } $PWD
3838
3939BAKE_PACKAGES_PATH=" $HOME /.bake/packages"
4040
Original file line number Diff line number Diff line change @@ -121,6 +121,20 @@ function 08_catch_failed_require () {
121121 bake_echo_green " This is after the require, if you see this then the test failed."
122122}
123123
124+ bake_test 09_test_bakepath
125+ function 09_test_bakepath () {
126+ bake_echo_green " This tests that setting a Bakepath works appropriately"
127+ BAKEPATH=" $PWD /lib" ../bake 09_test_bakepath_helper
128+ bake_echo_green " This is after the require, if you see this then the test succeeded."
129+ }
130+
131+ bake_task 09_test_bakepath_helper " Called by the associated test"
132+ function 09_test_bakepath_helper () {
133+ bake_echo_green " This should be called with the BAKEPATH=\" $PWD \" /lib by the associated test"
134+ bake_require lib/mylib.sh
135+ bake_require mylib.sh
136+ }
137+
124138bake_task all
125139function all () {
126140 bake_log_level fatal
You can’t perform that action at this time.
0 commit comments