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:36:22 +0000
commit1114c6f99f229c6ff7d79d19f8b7b0cede65e349 (patch)
treeb37d13575482c211f25f149cc0b1a5bdb915246f
parent6ddac36b34d42ae76ee3c8bd0ec39ff485a81f49 (diff)
downloadmongo-1114c6f99f229c6ff7d79d19f8b7b0cede65e349.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 4fc7bb221f0..a78fa58d31d 100644
--- a/site_scons/site_tools/ninja.py
+++ b/site_scons/site_tools/ninja.py
@@ -1113,7 +1113,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),