summaryrefslogtreecommitdiff
path: root/site_scons/site_tools
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-12 22:02:52 +0000
commit4db485642f9d1d3675308e8415da27c4ef212b79 (patch)
tree2760ca255e1a62ce86bd70d53b0cf949723f286e /site_scons/site_tools
parent3780d57e1e378b55a887a43115c8d303e8962a6b (diff)
downloadmongo-4db485642f9d1d3675308e8415da27c4ef212b79.tar.gz
SERVER-64757 Improve error messages when scons fails to generate-ninja on Windows
Diffstat (limited to 'site_scons/site_tools')
-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 c0999a81fe2..8505ce8e7ba 100644
--- a/site_scons/site_tools/ninja.py
+++ b/site_scons/site_tools/ninja.py
@@ -1182,7 +1182,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),