Default targets don't work correctly when element-path is "."
Summary
When element-path of a project is configured to ., i.e. the project directory, our logic for finding default elements breaks down. Since we stage junctions in .bst directory, the current logic tries to find all .bst files inside the junction, which is not expected. It's worse than that because it mangles the path and then tries to look for those elements in bst directory instead of .bst, and fails subsequently.
Steps to reproduce
- Create a project with
element-path: .. - Create a junction on some other project.
- Run
bst show, everything should be fine this time as we won't have.bstdirectory to begin with. - Run
bst showagain, watch it fail, as this timebsttries to find elements in the staged junctions.
What is the current bug behavior?
bst show or any other commands fail on all subsequent runs when no target is specified.
What is the expected correct behavior?
bst show and other commands should not attempt to find elements from staged junctions, and not error out in either case.
Relevant logs and/or screenshots
Edited by Chandan Singh