diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-04 15:50:54 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-04 15:53:57 +0200 |
commit | 252d2bdf2f12c8954f8b299000bbde6219d25335 (patch) | |
tree | a5ca507a8903ed4200a5df70f0c2668f78caf63f | |
parent | eaecc5ea12f4a5ebe309d5654509c0771bbdc2f1 (diff) | |
download | meli-252d2bdf2f12c8954f8b299000bbde6219d25335.zip |
Replace hardcoded /bin/false with 'false'
Credits to http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/meli/patches/patch-src_conf_rs?rev=1.1.1.1&content-type=text/x-cvsweb-markup
-rw-r--r-- | src/conf.rs | 12 | ||||
-rw-r--r-- | src/conf/composing.rs | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/conf.rs b/src/conf.rs index fdd45562..8c1b6ed4 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -385,7 +385,7 @@ impl FileSettings { let err_msg = r#"You must set a global `composing` option. If you override `composing` in each account, you can use a dummy global like follows: [composing] -send_mail = '/bin/false' +send_mail = 'false' This is required so that you don't accidentally start meli and find out later that you can't send emails."#; if interactive { @@ -398,7 +398,7 @@ This is required so that you don't accidentally start meli and find out later th }; if ask.run() { let mut file = OpenOptions::new().append(true).open(&path)?; - file.write_all("[composing]\nsend_mail = '/bin/false'\n".as_bytes()) + file.write_all("[composing]\nsend_mail = 'false'\n".as_bytes()) .map_err(|err| { MeliError::new(format!( "Could not append to {}: {}", @@ -1214,7 +1214,7 @@ index_style = "Compact" identity="username@hostname.local" [composing] -send_mail = '/bin/false' +send_mail = 'false' "#; const IMAP_CONFIG: &str = r#" [accounts.imap] @@ -1223,10 +1223,10 @@ format = "imap" identity="username@example.com" server_username = "null" server_hostname = "example.com" -server_password_command = "/bin/false" +server_password_command = "false" [composing] -send_mail = '/bin/false' +send_mail = 'false' "#; const EXAMPLE_CONFIG: &str = include_str!("../docs/samples/sample-config.toml"); @@ -1262,7 +1262,7 @@ send_mail = '/bin/false' assert!(err.summary.as_ref().starts_with("You must set a global `composing` option. If you override `composing` in each account, you can use a dummy global like follows")); new_file .file - .write_all("[composing]\nsend_mail = '/bin/false'\n".as_bytes()) + .write_all("[composing]\nsend_mail = 'false'\n".as_bytes()) .unwrap(); let err = FileSettings::validate(new_file.path.clone(), false, true).unwrap_err(); assert_eq!(err.summary.as_ref(), "Configuration error (account-name): root_mailbox `/path/to/root/mailbox` is not a valid directory."); diff --git a/src/conf/composing.rs b/src/conf/composing.rs index d67d1cbe..8bbd9c78 100644 --- a/src/conf/composing.rs +++ b/src/conf/composing.rs @@ -95,7 +95,7 @@ pub struct ComposingSettings { impl Default for ComposingSettings { fn default() -> Self { ComposingSettings { - send_mail: SendMail::ShellCommand("/bin/false".into()), + send_mail: SendMail::ShellCommand("false".into()), editor_command: None, embed: false, format_flowed: true, |