From 38502ba818b5f65ddab58c83dae1dbafe80102b0 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 28 Feb 2026 10:46:24 +0200 Subject: 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 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) -- cgit v1.0