ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: print "workspace root" without loading repo

This commit is contained in:
Yuya Nishihara 2024-02-01 19:16:48 +09:00
parent 818a885658
commit 526953cd87

View file

@ -270,8 +270,8 @@ fn cmd_workspace_root(
command: &CommandHelper, command: &CommandHelper,
_args: &WorkspaceRootArgs, _args: &WorkspaceRootArgs,
) -> Result<(), CommandError> { ) -> Result<(), CommandError> {
let workspace_command = command.workspace_helper(ui)?; let root = command
let root = workspace_command .workspace_loader()?
.workspace_root() .workspace_root()
.to_str() .to_str()
.ok_or_else(|| user_error("The workspace root is not valid UTF-8"))?; .ok_or_else(|| user_error("The workspace root is not valid UTF-8"))?;