2022-06-18 21:56:31 -07:00
|
|
|
use super::*;
|
2019-07-13 01:55:06 -07:00
|
|
|
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) trait PlatformInterface {
|
2020-02-14 04:49:25 -08:00
|
|
|
/// Construct a command equivalent to running the script at `path` with the
|
|
|
|
/// shebang line `shebang`
|
2019-07-13 01:55:06 -07:00
|
|
|
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,
|
2019-07-13 01:55:06 -07:00
|
|
|
) -> Result<Command, OutputError>;
|
|
|
|
|
|
|
|
/// Set the execute permission on the file pointed to by `path`
|
2024-06-14 16:11:22 -07:00
|
|
|
fn set_execute_permission(path: &Path) -> io::Result<()>;
|
2019-07-13 01:55:06 -07:00
|
|
|
|
2020-02-14 04:49:25 -08:00
|
|
|
/// 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>;
|
2019-07-13 01:55:06 -07:00
|
|
|
|
2020-02-14 04:49:25 -08:00
|
|
|
/// Translate a path from a "native" path to a path the interpreter expects
|
2024-06-14 16:11:22 -07:00
|
|
|
fn convert_native_path(working_directory: &Path, path: &Path) -> FunctionResult;
|
2019-07-13 01:55:06 -07:00
|
|
|
}
|