summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Samuels <richard.l.samuels@gmail.com>2022-04-12 15:37:18 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-13 15:47:31 +0000
commit3c078de17292a93d369921c0f1178eddb4dc5ed8 (patch)
tree452db212072f7fca01fe7f53b5fcd6bf20d50760
parent32ebca2f431d0476bd14dba92d933c5e4fa4447c (diff)
downloadmongo-3c078de17292a93d369921c0f1178eddb4dc5ed8.tar.gz
SERVER-64757 Improve error messages when scons fails to generate-ninja on Windows
(cherry picked from commit 4db485642f9d1d3675308e8415da27c4ef212b79)
-rw-r--r--site_scons/site_tools/ninja.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py
index 393cbc89054..28140682ab0 100644
--- a/site_scons/site_tools/ninja.py
+++ b/site_scons/site_tools/ninja.py
@@ -1132,7 +1132,10 @@ def get_command(env, node, action): # pylint: disable=too-many-branches
# Possibly these could be ignore and the build would still work, however it may not always
# rebuild correctly, so we hard stop, and force the user to fix the issue with the provided
# ninja rule.
- raise Exception(f"Could not resolve path for {provider_dep} dependency on node '{node}'")
+ err_msg = f"Could not resolve path for '{provider_dep}' dependency on node '{node}', you may need to setup your shell environment for ninja builds."
+ if os.name == "nt":
+ err_msg += " On Windows, please ensure that you have run the necessary Visual Studio environment setup scripts (e.g. vcvarsall.bat ..., or launching a Visual Studio Command Prompt) before invoking SCons."
+ raise Exception(err_msg)
ninja_build = {
"order_only": get_order_only(node),