aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projectile.el4
-rw-r--r--test/projectile-test.el4
2 files changed, 4 insertions, 4 deletions
diff --git a/projectile.el b/projectile.el
index cc99ea4..6c833af 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1617,7 +1617,7 @@ Currently that's supported just for Git (sub-projects being Git
sub-modules there)."
(pcase vcs
('git projectile-git-submodule-command)
- (_ "")))
+ (_ nil)))
(defun projectile-get-ext-ignored-command (vcs)
"Determine which external command to invoke based on the project's VCS."
@@ -1703,7 +1703,7 @@ If `command' is nil or an empty string, return nil.
This allows commands to be disabled.
Only text sent to standard output is taken into account."
- (when (stringp command)
+ (when (and (stringp command) (not (string-empty-p command)))
(let ((default-directory root))
(with-temp-buffer
(shell-command command t "*projectile-files-errors*")
diff --git a/test/projectile-test.el b/test/projectile-test.el
index e26ed66..39f577d 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -638,8 +638,8 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
(describe "projectile-get-sub-projects-command"
(it "gets sub projects command for git"
(expect (string-prefix-p "git" (projectile-get-sub-projects-command 'git)) :to-be-truthy))
- (it "returns empty when vcs is not supported"
- (expect (string-empty-p (projectile-get-sub-projects-command 'none)) :to-be-truthy)))
+ (it "returns nil when vcs is not supported"
+ (expect (projectile-get-sub-projects-command 'none) :to-be nil)))
(describe "projectile-files-via-ext-command"
(it "returns nil when command is nil or empty or fails"