just/src/platform_interface.rs

22 lines
754 B
Rust
Raw Normal View History

use super::*;
pub(crate) trait PlatformInterface {
/// Construct a command equivalent to running the script at `path` with the
/// shebang line `shebang`
fn make_shebang_command(
path: &Path,
2022-11-02 23:37:35 -07:00
working_directory: Option<&Path>,
2021-05-17 20:44:12 -07:00
shebang: Shebang,
) -> Result<Command, OutputError>;
/// Set the execute permission on the file pointed to by `path`
fn set_execute_permission(path: &Path) -> io::Result<()>;
/// Extract the signal from a process exit status, if it was terminated by a
/// signal
2023-10-16 20:07:09 -07:00
fn signal_from_exit_status(exit_status: ExitStatus) -> Option<i32>;
/// Translate a path from a "native" path to a path the interpreter expects
fn convert_native_path(working_directory: &Path, path: &Path) -> FunctionResult;
}