Skip to content

Commit

Permalink
Merge pull request #754 from openSUSE/questions_documentation
Browse files Browse the repository at this point in the history
improve cli documentation for questions
  • Loading branch information
jreidinger authored Sep 18, 2023
2 parents 5c1f983 + 487e3a7 commit 7d0b821
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
11 changes: 11 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/agama-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.1.4", features = ["derive"] }
clap = { version = "4.1.4", features = ["derive", "wrap_help"] }
agama-lib = { path="../agama-lib" }
agama-settings = { path="../agama-settings" }
serde = { version = "1.0.152" }
Expand Down
9 changes: 8 additions & 1 deletion rust/agama-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ pub enum Commands {
/// Autoinstallation profile handling
#[command(subcommand)]
Profile(ProfileCommands),
/// Questions handling
/// Configuration for questions that come from installer
///
/// Questions are raised when an unexpected (by the user) situation happens in the installer:
/// like if an encrypted partition is detected and cannot be inspected,
/// if a repository is signed by an unknown GPG key, or if the installer is not sure
/// if multipath should be activated.
///
/// For more details see official agama documentation for Questions.
#[command(subcommand)]
Questions(QuestionsCommands),
}
13 changes: 12 additions & 1 deletion rust/agama-cli/src/questions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ use clap::{Args, Subcommand, ValueEnum};

#[derive(Subcommand, Debug)]
pub enum QuestionsCommands {
/// Set mode for answering questions.
/// Sets the mode for answering questions.
///
/// It allows to decide if questions will be interactive or
/// if they should not block installation.
Mode(ModesArgs),
/// Loads predefined answers to questions.
///
/// It allows to predefine answers for certain questions to skip
/// them in interactive mode or change answer in automatic mode.
///
/// For more details and examples see official Agama documentation.
/// https://github.com/openSUSE/agama/blob/master/doc/questions.md
Answers {
/// Local path to file with answers in YAML format
path: String,
},
}
Expand Down
5 changes: 5 additions & 0 deletions rust/package/agama-cli.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 14 19:44:57 UTC 2023 - Josef Reidinger <[email protected]>

- Improve questions CLI help text (gh#openSUSE/agama#754)

-------------------------------------------------------------------
Thu Sep 14 10:10:37 UTC 2023 - Imobach Gonzalez Sosa <[email protected]>

Expand Down

0 comments on commit 7d0b821

Please sign in to comment.