mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-17 13:14:26 +00:00
cli: on config error, point to documentation
This commit is contained in:
parent
3546cc1bf6
commit
5fe5991ca8
@ -2168,6 +2168,10 @@ pub fn handle_command_result(
|
|||||||
}
|
}
|
||||||
Err(CommandError::ConfigError(message)) => {
|
Err(CommandError::ConfigError(message)) => {
|
||||||
writeln!(ui.error(), "Config error: {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))
|
Ok(ExitCode::from(1))
|
||||||
}
|
}
|
||||||
Err(CommandError::CliError(message)) => {
|
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"]);
|
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &["init", "repo"]);
|
||||||
insta::assert_snapshot!(stderr.replace('\\', "/"), @r###"
|
insta::assert_snapshot!(stderr.replace('\\', "/"), @r###"
|
||||||
Config error: expected newline, found an identifier at line 1 column 10 in config/config0001.toml
|
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…
x
Reference in New Issue
Block a user