Skip to content

Commit b035fde

Browse files
committed
fix
1 parent 65f755e commit b035fde

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub fn initialize_build(
138138
let project_root = helpers::get_abs_path(path);
139139
let workspace_root = helpers::get_workspace_root(&project_root);
140140
let bsc_path = match bsc_path {
141-
Some(bsc_path) => bsc_path,
141+
Some(bsc_path) => helpers::get_abs_path(&bsc_path),
142142
None => helpers::get_bsc(&project_root, workspace_root.to_owned()),
143143
};
144144
let root_config_name = packages::read_package_name(&project_root)?;

src/build/compile.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use anyhow::anyhow;
1212
use console::style;
1313
use log::{debug, trace};
1414
use rayon::prelude::*;
15-
use std::path::Path;
15+
use std::path::{Component, Path, PathBuf};
1616
use std::process::Command;
1717
use std::time::SystemTime;
1818

@@ -469,7 +469,7 @@ pub fn compiler_args(
469469
"-bs-package-output".to_string(),
470470
format!(
471471
"{}:{}:{}",
472-
root_config.get_module(),
472+
spec.module,
473473
if spec.in_source {
474474
Path::new(file_path)
475475
.parent()
@@ -479,9 +479,13 @@ pub fn compiler_args(
479479
.to_string()
480480
} else {
481481
format!(
482-
"lib/{}/{}",
483-
spec.get_out_of_source_dir(),
484-
Path::new(file_path).parent().unwrap().to_str().unwrap()
482+
"lib/{}",
483+
Path::join(
484+
Path::new(&spec.get_out_of_source_dir()),
485+
Path::new(file_path).parent().unwrap()
486+
)
487+
.to_str()
488+
.unwrap()
485489
)
486490
},
487491
root_config.get_suffix()

0 commit comments

Comments
 (0)