This commit is contained in:
Casey Rodarmor 2025-07-05 20:09:26 -07:00
parent 826b49d34d
commit 859907491e
4 changed files with 4 additions and 4 deletions

View file

@ -333,9 +333,9 @@ fn file_stem(_context: Context, path: &str) -> FunctionResult {
fn invocation_directory(context: Context) -> FunctionResult {
Platform::convert_native_path(
&context.evaluator.context.config,
&context.evaluator.context.search.working_directory,
&context.evaluator.context.config.invocation_directory,
&context.evaluator.context.config,
)
.map_err(|e| format!("Error getting shell path: {e}"))
}

View file

@ -37,9 +37,9 @@ impl PlatformInterface for Platform {
}
fn convert_native_path(
_config: &Config,
_working_directory: &Path,
path: &Path,
_config: &Config,
) -> FunctionResult {
path
.to_str()

View file

@ -57,7 +57,7 @@ impl PlatformInterface for Platform {
None
}
fn convert_native_path(working_directory: &Path, path: &Path, config: &Config) -> FunctionResult {
fn convert_native_path(config: &Config, working_directory: &Path, path: &Path) -> FunctionResult {
// Translate path from windows style to unix style
let mut cygpath = Command::new(&config.cygpath);

View file

@ -2,7 +2,7 @@ use super::*;
pub(crate) trait PlatformInterface {
/// translate path from "native" path to path interpreter expects
fn convert_native_path(working_directory: &Path, path: &Path, config: &Config) -> FunctionResult;
fn convert_native_path(config: &Config, working_directory: &Path, path: &Path) -> FunctionResult;
/// install handler, may only be called once
fn install_signal_handler<T: Fn(Signal) + Send + 'static>(handler: T) -> RunResult<'static>;