diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 054a5bb50f..f209fb118f 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -6547,6 +6547,10 @@ bool cliProcessCustomDefaults(void) processCharacter(*customDefaultsPtr++); } + // Process a newline at the very end so that the last command gets executed, + // even when the file did not contain a trailing newline + processCharacter('\r'); + processingCustomDefaults = false; #if !defined(DEBUG_CUSTOM_DEFAULTS) cliWriter = cliWriterTemp;