[Backport 1.6] When NimScript errors prevents NimSuggest from Init (#23348)

This commit is contained in:
Juan M Gómez
2024-03-03 16:36:34 +00:00
committed by GitHub
parent 51c86fdae7
commit afced7d9ab

View File

@@ -425,7 +425,10 @@ proc handleError(conf: ConfigRef; msg: TMsgKind, eh: TErrorHandling, s: string,
conf.exitcode = 1'i8
if conf.errorCounter >= conf.errorMax:
# only really quit when we're not in the new 'nim check --def' mode:
if conf.ideCmd == ideNone:
when defined(nimsuggest):
#we need to inform the user that something went wrong when initializing NimSuggest
raiseRecoverableError(s)
else:
quit(conf, msg)
elif eh == doAbort and conf.cmd != cmdIdeTools:
quit(conf, msg)