mirror of https://github.com/helix-editor/helix
escape paths correctly when loading the modules
parent
a1b13e570d
commit
95ad1fe2c7
|
@ -1379,7 +1379,7 @@ fn run_initialization_script(cx: &mut Context, configuration: Arc<ArcSwapAny<Arc
|
||||||
let res = guard.run_with_reference(
|
let res = guard.run_with_reference(
|
||||||
cx,
|
cx,
|
||||||
"*helix.cx*",
|
"*helix.cx*",
|
||||||
&format!(r#"(require "{}")"#, helix_module_path.to_str().unwrap()),
|
&format!(r#"(require {:?})"#, helix_module_path.to_str().unwrap()),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Present the error in the helix.scm loading
|
// Present the error in the helix.scm loading
|
||||||
|
|
|
@ -38,6 +38,16 @@ pub mod tasks {
|
||||||
code_gen()
|
code_gen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn install_steel() {
|
||||||
|
code_gen();
|
||||||
|
std::process::Command::new("cargo")
|
||||||
|
.args(["install", "--path", "helix-term", "--locked", "--force"])
|
||||||
|
.spawn()
|
||||||
|
.unwrap()
|
||||||
|
.wait()
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn print_help() {
|
pub fn print_help() {
|
||||||
println!(
|
println!(
|
||||||
"
|
"
|
||||||
|
@ -61,6 +71,7 @@ fn main() -> Result<(), DynError> {
|
||||||
"themelint" => tasks::themelint(env::args().nth(2))?,
|
"themelint" => tasks::themelint(env::args().nth(2))?,
|
||||||
"query-check" => tasks::querycheck()?,
|
"query-check" => tasks::querycheck()?,
|
||||||
"code-gen" => tasks::codegen(),
|
"code-gen" => tasks::codegen(),
|
||||||
|
"steel" => tasks::install_steel(),
|
||||||
invalid => return Err(format!("Invalid task name: {}", invalid).into()),
|
invalid => return Err(format!("Invalid task name: {}", invalid).into()),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue