forked from mirrors/jj
cli: on config error, point to documentation
This commit is contained in:
parent
3546cc1bf6
commit
5fe5991ca8
2 changed files with 5 additions and 0 deletions
|
@ -2168,6 +2168,10 @@ pub fn handle_command_result(
|
|||
}
|
||||
Err(CommandError::ConfigError(message)) => {
|
||||
writeln!(ui.error(), "Config error: {message}")?;
|
||||
writeln!(
|
||||
ui.hint(),
|
||||
"For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md."
|
||||
)?;
|
||||
Ok(ExitCode::from(1))
|
||||
}
|
||||
Err(CommandError::CliError(message)) => {
|
||||
|
|
|
@ -326,6 +326,7 @@ fn test_invalid_config() {
|
|||
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &["init", "repo"]);
|
||||
insta::assert_snapshot!(stderr.replace('\\', "/"), @r###"
|
||||
Config error: expected newline, found an identifier at line 1 column 10 in config/config0001.toml
|
||||
For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md.
|
||||
"###);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue