Skip to content

Commit

Permalink
[Fix #1205] Add check that a project exists before switching to it (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjfoley authored and bbatsov committed Sep 24, 2018
1 parent c5d5de1 commit 8a424b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* [#1285](https://github.com/bbatsov/projectile/pull/1285): Add support for Pipenv-managed Python projects.
* [#1232](https://github.com/bbatsov/projectile/issues/1232): Stop evaluating code dynamically in the mode-line and switch to a simpler scheme where the mode-line is updated just once using `find-file-hook`.
* Make the mode line configurable via `projectile-dynamic-mode-line` and `projectile-mode-line-fn`.
* [#1205](https://github.com/bbatsov/projectile/issues/1205): Check that project directory exists when switching projects.

## 1.0.0 (2018-07-21)

Expand Down
3 changes: 3 additions & 0 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -3569,6 +3569,9 @@ With a prefix ARG invokes `projectile-commander' instead of
Invokes the command referenced by `projectile-switch-project-action' on switch.
With a prefix ARG invokes `projectile-commander' instead of
`projectile-switch-project-action.'"
(unless (projectile-project-p project-to-switch)
(projectile-remove-known-project project-to-switch)
(error "Directory %s is not a project" project-to-switch))
(let ((switch-project-action (if arg
'projectile-commander
projectile-switch-project-action)))
Expand Down

0 comments on commit 8a424b2

Please sign in to comment.