escape paths correctly when loading the modules

pull/8675/merge^2
mattwparas 8 months ago
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(
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

@ -38,6 +38,16 @@ pub mod tasks {
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() {
println!(
"
@ -61,6 +71,7 @@ fn main() -> Result<(), DynError> {
"themelint" => tasks::themelint(env::args().nth(2))?,
"query-check" => tasks::querycheck()?,
"code-gen" => tasks::codegen(),
"steel" => tasks::install_steel(),
invalid => return Err(format!("Invalid task name: {}", invalid).into()),
},
};

Loading…
Cancel
Save