mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Compute src_dir from original filename
This fixed a bug where bindgen was providing cwd() for src_dir, but actually the src_dir should have been based on the filename. This prevents that problem from happening in the future!
This commit is contained in:
parent
6abf25e3a8
commit
bf63c45b46
12 changed files with 10 additions and 47 deletions
|
@ -90,8 +90,6 @@ fn main() -> io::Result<()> {
|
|||
let emit_timings = matches.is_present(FLAG_TIME);
|
||||
let filename = matches.value_of_os(ROC_FILE).unwrap();
|
||||
let roc_file_path = PathBuf::from(filename);
|
||||
let src_dir = roc_file_path.parent().unwrap().to_owned();
|
||||
|
||||
let threading = match matches
|
||||
.value_of(roc_cli::FLAG_MAX_THREADS)
|
||||
.and_then(|s| s.parse::<usize>().ok())
|
||||
|
@ -102,7 +100,7 @@ fn main() -> io::Result<()> {
|
|||
Some(n) => Threading::AtMost(n),
|
||||
};
|
||||
|
||||
match check_file(&arena, src_dir, roc_file_path, emit_timings, threading) {
|
||||
match check_file(&arena, roc_file_path, emit_timings, threading) {
|
||||
Ok((problems, total_time)) => {
|
||||
println!(
|
||||
"\x1B[{}m{}\x1B[39m {} and \x1B[{}m{}\x1B[39m {} found in {} ms.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue