We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a47b332 commit 162996eCopy full SHA for 162996e
1 file changed
crates/exec-harness/src/lib.rs
@@ -54,7 +54,7 @@ pub fn read_commands_from_stdin() -> Result<Vec<BenchmarkCommand>> {
54
input.push('\n');
55
}
56
57
- let commands: Vec<BenchmarkCommand> =
+ let mut commands: Vec<BenchmarkCommand> =
58
serde_json::from_str(&input).context("Failed to parse JSON from stdin")?;
59
60
if commands.is_empty() {
@@ -67,6 +67,17 @@ pub fn read_commands_from_stdin() -> Result<Vec<BenchmarkCommand>> {
67
68
69
70
+ for cmd in &mut commands {
71
+ if let Some(stdin_path) = &cmd.stdin {
72
+ if !stdin_path.is_absolute() {
73
+ cmd.stdin = Some(
74
+ std::fs::canonicalize(stdin_path)
75
+ .unwrap_or_else(|_| std::env::current_dir().unwrap().join(stdin_path)),
76
+ );
77
+ }
78
79
80
+
81
Ok(commands)
82
83
0 commit comments