Skip to content

Commit

Permalink
fix projects plugin regression
Browse files Browse the repository at this point in the history
This regression was introduced in ea2002a.

Before this commit, when the provided project was unique under all the
project paths, the command automatically change the directory to it.
Currently this is no more the case.
If there are many project paths set, then the project path menu is shown
at every call.
This PR solves this issue.

Signed-off-by: Eric Villard <dev@eviweb.fr>
  • Loading branch information
eviweb committed Mar 16, 2022
1 parent d1b831a commit 088212f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/available/projects.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function pj() {
# with the same name in project directories
IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}"
for d in "${!dests[@]}"; do
if [[ ! -d "${dests[d]}" ]]; then
if [[ ! -d "${dests[d]}/${proj}" ]]; then
unset 'dests[d]'
fi
done
Expand Down

0 comments on commit 088212f

Please # to comment.