aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 10:46:24 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 10:51:37 +0200
commit38502ba818b5f65ddab58c83dae1dbafe80102b0 (patch)
tree1b3bb6018a7c0285cfb2c0b36297cfd2b6e76f7d
parent44ac99f93ae8ca433778a04bbafce9e6eb4c23ef (diff)
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.
-rw-r--r--projectile.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/projectile.el b/projectile.el
index 4f13a07..a0eaebf 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)