From 8d4c6446d137e24a1124df2cf586a1fb54d2f698 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Mon, 28 Dec 2015 16:40:21 +0000 Subject: [PATCH] Fixes #171 --- src/nimblepkg/nimscriptsupport.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nimblepkg/nimscriptsupport.nim b/src/nimblepkg/nimscriptsupport.nim index 850cbb1..b74da46 100644 --- a/src/nimblepkg/nimscriptsupport.nim +++ b/src/nimblepkg/nimscriptsupport.nim @@ -264,6 +264,10 @@ proc readPackageInfoFromNims*(scriptName: string, options: Options, # Execute the nimscript file. execScript(scriptName, nil, options) + # Check whether an error has occurred. + if msgs.gErrorCounter > 0: + raise newException(NimbleError, previousMsg) + # Extract all the necessary fields populated by the nimscript file. proc getSym(thisModule: PSym, ident: string): PSym = thisModule.tab.strTableGet(getIdent(ident))