summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hayden <andyhayden1@gmail.com>2018-08-18 18:31:32 -0700
committerRyan Dahl <ry@tinyclouds.org>2018-08-18 22:20:53 -0400
commit146bc93b81ef1775a3a22784c74cbf0c8bbd1c9e (patch)
tree9aa37de9018daac0e946028a0d48e0451ba86115
parent2d6cb9024e2635e9f40c8f7c0bf3a000d5a26c26 (diff)
Add an error message if rustc is not installed
-rwxr-xr-xbuild_extra/rust/get_rust_ldflags.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/build_extra/rust/get_rust_ldflags.py b/build_extra/rust/get_rust_ldflags.py
index a1726fd4f..79c7bc3fb 100755
--- a/build_extra/rust/get_rust_ldflags.py
+++ b/build_extra/rust/get_rust_ldflags.py
@@ -118,6 +118,11 @@ def main():
argsfile_content = os.read(argsfile_fd, argsfile_size)
args = argsfile_content.split("\n")
+ except OSError as e: # Note: in python 3 this will be a FileNotFoundError.
+ print "Error executing rustc command (is rust installed?):"
+ print " ".join(rustc_cmd) + "\n"
+ raise e
+
finally:
# Close and delete the temporary file.
os.close(argsfile_fd)