Skip to content

Commit

Permalink
[Backport 1.6] When NimScript errors prevents NimSuggest from Init
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Feb 24, 2024
1 parent 51c86fd commit 1281b42
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/msgs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1281b42

Please sign in to comment.