Skip to content

Commit 1e90380

Browse files
authored
fix(gmail): remove duplicate attachment arg on +send (#532)
The +send subcommand defined its own "attachment" arg in addition to the "attach" arg already provided by common_mail_args. Since parse_attachments reads "attach", the duplicate "attachment" arg was dead — +send --attachment was silently accepted by clap but the value was never read.
1 parent 2e909ae commit 1e90380

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@googleworkspace/cli": patch
3+
---
4+
5+
fix(gmail): remove dead `--attachment` arg from `+send`
6+
7+
The `+send` subcommand defined a duplicate `"attachment"` arg alongside the
8+
`"attach"` arg already provided by `common_mail_args`. Since `parse_attachments`
9+
reads `"attach"`, the `--attachment` flag was silently ignored. Removed the
10+
dead duplicate.

skills/gws-gmail-send/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT>
3030
| `--subject` ||| Email subject |
3131
| `--body` ||| Email body (plain text, or HTML with --html) |
3232
| `--from` ||| Sender address (for send-as/alias; omit to use account default) |
33-
| `--attachment` ||| Attach a file (can be repeated for multiple files) |
3433
| `--attach` ||| Attach a file (can be specified multiple times) |
3534
| `--cc` ||| CC email address(es), comma-separated |
3635
| `--bcc` ||| BCC email address(es), comma-separated |

src/helpers/gmail/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,6 @@ impl Helper for GmailHelper {
922922
.long("from")
923923
.help("Sender address (for send-as/alias; omit to use account default)")
924924
.value_name("EMAIL"),
925-
)
926-
.arg(
927-
Arg::new("attachment")
928-
.long("attachment")
929-
.help("Attach a file (can be repeated for multiple files)")
930-
.action(ArgAction::Append)
931-
.value_name("PATH"),
932925
),
933926
)
934927
.after_help(

0 commit comments

Comments
 (0)