about summary refs log tree commit diff
path: root/src/error-index-generator/main.rs
diff options
context:
space:
mode:
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(())