mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
6
.changes/cli-sign-non-interactive.md
Normal file
6
.changes/cli-sign-non-interactive.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value.
|
||||
@@ -21,11 +21,17 @@ pub struct Options {
|
||||
/// Overwrite private key even if it exists on the specified path
|
||||
#[clap(short, long)]
|
||||
force: bool,
|
||||
/// Skip prompting for values
|
||||
#[clap(short, long)]
|
||||
ci: bool,
|
||||
}
|
||||
|
||||
pub fn command(options: Options) -> Result<()> {
|
||||
if options.password.is_none() {
|
||||
println!("Generating new private key without password.")
|
||||
pub fn command(mut options: Options) -> Result<()> {
|
||||
options.ci = options.ci || std::env::var("CI").is_ok();
|
||||
|
||||
if options.ci && options.password.is_none() {
|
||||
println!("Generating new private key without password.");
|
||||
options.password.replace("".into());
|
||||
}
|
||||
let keypair = generate_key(options.password).expect("Failed to generate key");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user