From 883a109a7a18061c2d1ab331ca59ac18d711bed4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 4 Jun 2021 14:50:28 -0400 Subject: [PATCH] Fix "Couldn't find project root" error on +ivy/compile --- modules/completion/ivy/autoload/ivy.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 66e834df589..12308e83068 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -322,7 +322,11 @@ If ARG (universal argument), include all files, even hidden or compressed ones." (defun +ivy/compile () "Execute a compile command from the current buffer's directory." (interactive) - (counsel-compile default-directory)) + ;; Fix unhelpful 'Couldn't find project root' error + (letf! (defun counsel--compile-root () + (ignore-errors + (funcall counsel--compile-root))) + (counsel-compile default-directory))) ;;;###autoload (defun +ivy/project-compile ()