Skip to content

Commit fef647a

Browse files
committed
Fixed bug on Windows that treats MSVC banner as error
1 parent cf8d40a commit fef647a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nimporter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ def compile(cls, module_path, release_mode=False):
172172
if NIM_COMPILE_ERROR in err:
173173
raise NimCompilerException(err)
174174
elif err:
175-
raise Exception(err)
175+
# NOTE(pebaz): On Windows, Nim spits out the MSVC banner to stderr,
176+
# causing `err` to not be None. If it built, ignore the error.
177+
if not build_artifact.exists():
178+
raise Exception(err)
176179
elif NIM_COMPILE_ERROR in out:
177180
raise NimCompilerException(out)
178181

0 commit comments

Comments
 (0)