commit:     d6db09c32455767d6216cb8fb7f2697f5f49ec4a
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 20:22:12 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 20:22:12 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/company-ebuild.git/commit/?id=d6db09c3

company-ebuild.el: check if profiles/use.desc exists

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 company-ebuild.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company-ebuild.el b/company-ebuild.el
index 2fbfedc..e2c34df 100644
--- a/company-ebuild.el
+++ b/company-ebuild.el
@@ -186,7 +186,8 @@ FILE-PATH is the location from which we start searching for 
Eclass files."
               (company-ebuild--find-repo-root buffer-file-name)))
         (awk-format
          "awk -F - '{ print $1 }' %s/profiles/use.desc"))
-    (when repo-root
+    (when (and repo-root
+               (file-exists-p (expand-file-name "profiles/use.desc" 
repo-root)))
       (setq company-ebuild--dynamic-keywords-use-flags
             (let ((awk-result
                    (shell-command-to-string (format awk-format repo-root))))

Reply via email to