summaryrefslogtreecommitdiff
path: root/terminal-here.el
diff options
context:
space:
mode:
Diffstat (limited to 'terminal-here.el')
-rw-r--r--terminal-here.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/terminal-here.el b/terminal-here.el
index 62c4a43..9ba5e32 100644
--- a/terminal-here.el
+++ b/terminal-here.el
@@ -69,9 +69,10 @@ changed it by running `cd'."
If projectile is installed the projectile root will be used,
Otherwise `vc-root-dir' will be used."
(interactive)
- (terminal-here-launch-in-directory (if (functionp 'projectile-project-root)
- (projectile-project-root)
- (vc-root-dir))))
+ (terminal-here-launch-in-directory (cond
+ ((and (functionp 'projectile-project-root) (projectile-project-root)))
+ ((and (functionp 'vc-root-dir) (vc-root-dir)))
+ (t (signal 'user-error "Failed to detect project root, if you are in a version-controlled project try installing projectile or upgrading to emacs 25")))))