about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 18d19b672..352615c83 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2785,6 +2785,11 @@ execcmd(Estate state, int input, int output, int how, int last1)
 		     * arguments before and no command substitution
 		     * has provided a status.
 		     */
+		    if (badcshglob == 1) {
+			zerr("no match");
+			lastval = 1;
+			return;
+		    }
 		    cmdoutval = use_cmdoutval ? lastval : 0;
 		    if (varspc)
 			addvars(state, varspc, 0);