Skip to content

Commit 294a5e4

Browse files
feat: only wrap walltime command with sudo on linux
We do not yet need sudo, since we don't use launchtl nor profilers yet.
1 parent 7917f2c commit 294a5e4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/executor/wall_time/executor.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@ impl Executor for WallTimeExecutor {
163163
)
164164
.await
165165
} else {
166-
let cmd = wrap_with_sudo(cmd_builder)?.build();
166+
let cmd_builder = if cfg!(target_os = "linux") {
167+
wrap_with_sudo(cmd_builder)?
168+
} else {
169+
cmd_builder
170+
};
171+
let cmd = cmd_builder.build();
167172
debug!("cmd: {cmd:?}");
168173
run_command_with_log_pipe(cmd).await
169174
}

0 commit comments

Comments
 (0)