Skip to content

Commit eac9676

Browse files
committed
WIP: std::path::absolute to std::fs::canonicalize
1 parent 55c281d commit eac9676

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

substrate/utils/frame/benchmarking-cli/src/pallet/command.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ impl PalletCmd {
750750
state: &'a BenchmarkingState<H>,
751751
) -> Result<FetchedCode<'a, BenchmarkingState<H>, H>> {
752752
if let Some(runtime) = &self.runtime {
753-
let runtime = std::path::absolute(runtime)
753+
// let runtime = std::path::absolute(runtime) - FAIL-CI
754+
let runtime = std::fs::canonicalize(runtime)
754755
.map_err(|e| format!("Could not get absolute path for runtime file: {e}"))?;
755756
log::info!("Loading WASM from {}", runtime.display());
756757

substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ pub(crate) fn write_results(
484484
benchmarks: results.clone(),
485485
};
486486

487-
let file_path = std::path::absolute(&file_path).map_err(|e| {
487+
// let file_path = std::path::absolute(&file_path).map_err(|e| { - FAIL-CI
488+
let file_path = std::fs::canonicalize(&file_path).map_err(|e| {
488489
format!("Could not get absolute path for: {:?}. Error: {:?}", &file_path, e)
489490
})?;
490491
let mut output_file = fs::File::create(&file_path).map_err(|e| {

0 commit comments

Comments
 (0)