branch: elpa/projectile
commit 38502ba818b5f65ddab58c83dae1dbafe80102b0
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Error early on nil command in projectile--run-project-cmd
    
    When no command is configured for a project type and
    compilation-read-command is nil (skipping the prompt), the nil
    command would reach (compile nil) and signal a cryptic
    wrong-type-argument error. Signal a clear user-error instead.
---
 projectile.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/projectile.el b/projectile.el
index 4f13a07b59..a0eaebf0e6 100644
--- a/projectile.el
+++ b/projectile.el
@@ -5502,6 +5502,9 @@ The command actually run is returned."
     (when projectile-per-project-compilation-buffer
       (setq compilation-buffer-name-function 
#'projectile-compilation-buffer-name)
       (setq compilation-save-buffers-predicate 
#'projectile-current-project-buffer-p))
+    (unless command
+      (user-error "No %scommand configured for project type `%s'"
+                  (or prompt-prefix "") (projectile-project-type)))
     (unless (file-directory-p default-directory)
       (mkdir default-directory))
     (projectile-run-compilation command use-comint-mode)

Reply via email to