Skip to content

Prepend arg for defaults-file#571

Open
tikotzky wants to merge 3 commits into1Password:mainfrom
tikotzky:fix-mysql-arg-order
Open

Prepend arg for defaults-file#571
tikotzky wants to merge 3 commits into1Password:mainfrom
tikotzky:fix-mysql-arg-order

Conversation

@tikotzky
Copy link

Overview

This is a continuation of #408, updated to add a separate PrependArgs and only use it in the mysql plugin.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

How To Test

Changelog

Update mysql plugin to always add --defaults-file as the first argument.

nr-dbuckwalter and others added 2 commits January 29, 2026 14:28
Add a PrependArgs FileOption that allows specific plugins to opt into
prepending arguments instead of appending. This preserves the default
AddArgs behavior for all other plugins while allowing MySQL to place
--defaults-file first as required by the mysql CLI.
@HighMileage
Copy link

Just noting that this PR would also address the thrust of #508 (albeit in a slightly different fashion)

@HighMileage HighMileage mentioned this pull request Feb 3, 2026
4 tasks
@HighMileage
Copy link

@mrjones2014 could you take a look at this PR? You reviewed the last attempt to fix this rough edge on the mysql plugin and your feedback was incorporated here. Given how common mysql and 1Password usage is, it feels like this getting this on main would be useful to lots of people trying to use msyql + op + additional command line args.

Copy link
Member

@mrjones2014 mrjones2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll still have to chase down a second approval.

Full disclosure, I've actually stopped using Shell Plugins since I've been unable to really get anything merged myself.

@HighMileage
Copy link

Thank you @mrjones2014 -- appreciate the review and context 🙇 (similarly I was pretty stoked on plugins and then hit issues with the mysql one and set them to the side for a year -- I want to believe!)

@AndyTitu any chance you could take a look as you were also in the original PR on this topic?

@HighMileage
Copy link

@tikotzky can you fix the CI failures here?

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

The slices package requires Go 1.21+ but go.mod specifies Go 1.18.
This caused golangci-lint to fail resolving the import, cascading
into typecheck errors across the codebase.
@tikotzky tikotzky force-pushed the fix-mysql-arg-order branch from e0360e4 to 15e7c21 Compare March 6, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1Password mysql shell plugin breaks additional CLI arguments

4 participants