Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for options with spaces to riemann-wrapper #280

Merged
merged 1 commit into from
Jan 13, 2024

Conversation

smortex
Copy link
Member

@smortex smortex commented Jan 12, 2024

When riemann-wrapper is used with a configuration file (and only in
this case), it is not possible to prevent splitting of options
containing spaces, adding an arbitrary constraint for the user if they
want to pass options with spaces (e.g. when passing a custom format
string to a tool).

Rework options splitting when reading options from a file, so that the
user can:

  • quote part of the string (i.e. options: --format='foo bar');
  • escape spaces (i.e. options: --format=foo\ bar).

The above examples are evaluated as an array with a single string item:
["--format=foo bar"].

When `riemann-wrapper` is used with a configuration file (and only in
this case), it is not possible to prevent splitting of options
containing spaces, adding an arbitrary constraint for the user if they
want to pass options with spaces (e.g. when passing a custom format
string to a tool).

Rework options splitting when reading options from a file, so that the
user can:
* quote part of the string (i.e. `options: --format='foo bar'`);
* escape spaces (i.e. `options: --format=foo\ bar`).

The above examples are evaluated as an array with a single string item:
`["--format=foo bar"]`.
@smortex smortex added the enhancement New feature or request label Jan 12, 2024
@smortex smortex marked this pull request as ready for review January 12, 2024 21:42
Copy link
Member

@jamtur01 jamtur01 left a comment

Choose a reason for hiding this comment

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

LGTM

@jamtur01 jamtur01 merged commit 5d4951f into main Jan 13, 2024
8 checks passed
@jamtur01 jamtur01 deleted the options-with-spaces branch January 13, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants