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:42:40 +0000
commit6ad9b9b8d780d1c400c44ad1bcc9051232ac8b4a (patch)
treec50931546245c240cce17c51a0ae89068224178d
parentc0036901e114de3411f4b3d6a1da8f2c0196c6d8 (diff)
downloadmongo-6ad9b9b8d780d1c400c44ad1bcc9051232ac8b4a.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 5826be827f4..671526d7b4e 100644
--- a/site_scons/site_tools/ninja.py
+++ b/site_scons/site_tools/ninja.py
@@ -1154,7 +1154,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),