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

Bug with certain scripts elements #1231

Closed
dereuromark opened this issue Dec 4, 2023 · 4 comments
Closed

Bug with certain scripts elements #1231

dereuromark opened this issue Dec 4, 2023 · 4 comments
Labels

Comments

@dereuromark
Copy link

dereuromark commented Dec 4, 2023

Steps required to reproduce the problem

php-collective/code-sniffer#9

Using 2.39.0 phar

Expected Result

No invalid changes

Actual Result

Due to some \ escaping in the script section, e.g.

"increase-severity": "sed -i.bak 's/<severity>0<\\/severity>/<!--<severity>0<\\/severity>-->/' Spryker/ruleset.xml",

all other normal / are also modified in a way that makes the composer.json invalid.

@fredden
Copy link

fredden commented Dec 5, 2023

@dereuromark I'm having trouble verifying the problem that you are trying to report. Please can you help me better understand what is wrong here? What's "invalid" about composer.json after running composer normalize?

I have cloned https://github.com/php-collective/code-sniffer (at 9ab1d48781eb8bb4de2e97eb0fbdc9373eb654ab), and ran the following commands: jq < composer.json > before.json && composer normalize && jq < composer.json > after.json. Looking at the difference between before.json and after.json, I can only see ordering differences.

Perhaps you're trying to highlight the unnecessary (but certainly not invalid) escaping of / characters, as was discussed in #965. Having looked into that issue again just now, it looks like it was perhaps closed by mistake, or at least without a clear "won't fix" from @localheinz.

@dereuromark
Copy link
Author

Yes, the slashes added in all lines almost, which for sure Look very invalid. They might work, but Are not acceptable none the less.

@localheinz
Copy link
Member

@dereuromark @fredden

I already have an idea how to solves this, but it may take some time.

@fredden
Copy link

fredden commented Dec 5, 2023

@dereuromark thanks for confirming that this is a duplicate of (now-reopened) #965. I think this issue can be safely closed, to keep the discussion in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants