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

snapcraft: Allow equal sign in commands #4477

Closed
wants to merge 1 commit into from

Conversation

3v1n0
Copy link
Contributor

@3v1n0 3v1n0 commented Dec 4, 2023

In various cases applications require to use --option=value syntax but this is currently blocked by snapcraft syntax checker.

So add the equal sign as a valid value in the regex since it does seems to be harmful.

See also: https://forum.snapcraft.io/t/please-allow-equals-symbol-in-snapcraft-yaml/36709


  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint?
  • Have you successfully run pytest tests/unit?

In various cases applications require to use --option=value syntax but this is 
currently blocked by snapcraft syntax checker.

So add the equal sign as a valid value in the regex since it does seems to be
harmful.

See also: https://forum.snapcraft.io/t/please-allow-equals-symbol-in-snapcraft-yaml/36709
Copy link
Collaborator

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

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

Hi @3v1n0, I appreciate the PR but unfortunately, this can't be fixed within snapcraft.

During packaging, Snapcraft calls snap pack, which does not support equal signs in the command field (see the launchpad bug for details).

The regex preventing equal signs in Snapcraft exists for two reasons:

  1. To raise the error as quickly as possible
  2. To present the user with a more readable error message than the one that snap pack raises

@sergiusens
Copy link
Collaborator

thanks, but we cannot enable this before the feature in snapd is completed (mentioned in the forum post)

@sergiusens sergiusens closed this Dec 12, 2023
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.

3 participants