flesh out todo list, better configure code
Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
parent
d296eb4510
commit
e7dd0caa4a
4 changed files with 64 additions and 26 deletions
|
|
@ -47,12 +47,24 @@ fn main() {
|
|||
}
|
||||
|
||||
let vt = Rc::new(RefCell::new(VTable::new()));
|
||||
// if we fail to get stdlib we can just use this one
|
||||
let mut ft = Rc::new(RefCell::new(FTable::new()));
|
||||
|
||||
let conf_file;
|
||||
let mut ft;
|
||||
match env::var("RELISH_CFG_FILE") {
|
||||
Ok(s) => configure(s, vt.clone(), ft.clone()),
|
||||
Err(_) => configure(cfg, vt.clone(), ft.clone()),
|
||||
Ok(s) => {
|
||||
conf_file = s
|
||||
},
|
||||
Err(e) => {
|
||||
eprintln!("{}", e);
|
||||
conf_file = cfg;
|
||||
},
|
||||
}
|
||||
|
||||
match configure(conf_file, vt.clone()) {
|
||||
Ok(f) => ft = f,
|
||||
Err(e) => {
|
||||
ft = Rc::new(RefCell::new(FTable::new()));
|
||||
eprintln!("{}", e);
|
||||
},
|
||||
}
|
||||
|
||||
match get_stdlib(vt.clone()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue