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 regex validator for app commands #4999

Open
mr-cal opened this issue Aug 23, 2024 · 2 comments
Open

Add regex validator for app commands #4999

mr-cal opened this issue Aug 23, 2024 · 2 comments
Labels
enhancement New features or optimizations triaged

Comments

@mr-cal
Copy link
Collaborator

mr-cal commented Aug 23, 2024

What needs to get done

Add a validator for command, stop-command, reload-command, post-stop-command, and bus-name to match snapd's validation.

Why it needs to get done

Using an = sign is a common mistake:

apps:
  my-app:
     command: my-app --parameter=foo
  • A user has to run the entire lifecycle to receive an error that could have been caught when validating.
  • The error message from snapd isn't great.
@mr-cal mr-cal added enhancement New features or optimizations triaged labels Aug 23, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3293.

This message was autogenerated

@medubelko
Copy link
Contributor

Let's make sure to enumerate the character limitations this imposes on the schema. Citing the (unedited) old schema doc:

The command must consist only of alphanumeric characters, spaces, and the following special characters: /, ., _, #, :, $, -. If other characters are required, a wrapper script should be used for the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or optimizations triaged
Projects
None yet
Development

No branches or pull requests

2 participants