about summary refs log tree commit diff
path: root/src/error-index-generator/main.rs
diff options
context:
space:
mode:
authorMichael Sproul <micsproul@gmail.com>2015-06-20 16:30:01 +1000
committerMichael Sproul <micsproul@gmail.com>2015-06-20 16:57:40 +1000
commit634fced396f180eea18a828bdddec3deded61ab8 (patch)
tree629f34b726d7484b04a9c51fe0094046f8486dc0 /src/error-index-generator/main.rs
parent2f5683913c9815d9f12494784747f79b0f3b3066 (diff)
downloadrust-634fced396f180eea18a828bdddec3deded61ab8.tar.gz
rust-634fced396f180eea18a828bdddec3deded61ab8.zip
diagnostics: Resurrect the Compiler Error Index.
Diffstat (limited to 'src/error-index-generator/main.rs')
-rw-r--r--src/error-index-generator/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/error-index-generator/main.rs b/src/error-index-generator/main.rs
index 33cb7584580..cbb67014e27 100644
--- a/src/error-index-generator/main.rs
+++ b/src/error-index-generator/main.rs
@@ -17,6 +17,7 @@ extern crate serialize as rustc_serialize;
 use std::collections::BTreeMap;
 use std::fs::{read_dir, File};
 use std::io::{Read, Write};
+use std::env;
 use std::path::Path;
 use std::error::Error;
 
@@ -106,7 +107,8 @@ r##"<!DOCTYPE html>
 }
 
 fn main_with_result() -> Result<(), Box<Error>> {
-    let metadata_dir = get_metadata_dir();
+    let build_arch = try!(env::var("CFG_BUILD"));
+    let metadata_dir = get_metadata_dir(&build_arch);
     let err_map = try!(load_all_errors(&metadata_dir));
     try!(render_error_page(&err_map, Path::new("doc/error-index.html")));
     Ok(())