mirror of
https://github.com/casey/just.git
synced 2025-08-04 23:17:59 +00:00
Enhance
This commit is contained in:
parent
826b49d34d
commit
859907491e
4 changed files with 4 additions and 4 deletions
|
@ -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}"))
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue