fix: fetch and build Helix grammar as a regular user (#698)
This commit is contained in:
@@ -796,20 +796,19 @@ pub fn run_dotnet_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_helix_grammars(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_helix_grammars(ctx: &ExecutionContext) -> Result<()> {
|
||||||
require("helix")?;
|
let helix = require("helix")?;
|
||||||
|
|
||||||
print_separator("Helix");
|
print_separator("Helix");
|
||||||
|
|
||||||
let sudo = require_option(ctx.sudo().as_ref(), REQUIRE_SUDO.to_string())?;
|
|
||||||
ctx.run_type()
|
ctx.run_type()
|
||||||
.execute(sudo)
|
.execute(&helix)
|
||||||
.args(["helix", "--grammar", "fetch"])
|
.args(["--grammar", "fetch"])
|
||||||
.status_checked()
|
.status_checked()
|
||||||
.with_context(|| "Failed to download helix grammars!")?;
|
.with_context(|| "Failed to download helix grammars!")?;
|
||||||
|
|
||||||
ctx.run_type()
|
ctx.run_type()
|
||||||
.execute(sudo)
|
.execute(&helix)
|
||||||
.args(["helix", "--grammar", "build"])
|
.args(["--grammar", "build"])
|
||||||
.status_checked()
|
.status_checked()
|
||||||
.with_context(|| "Failed to build helix grammars!")?;
|
.with_context(|| "Failed to build helix grammars!")?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user