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

🐛 Explicit wrap messages with quotes #1392

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

segersniels
Copy link
Collaborator

@segersniels segersniels commented Jan 15, 2025

Description

Fixes #1391. Not sure if this ever reported with quotes around the message but execa seems to automatically escape quotes and at one point it stopped working.

Added

  • Added shell: true option to git commit execution

Changed

  • Updated commit message formatting to include quotes around both title and message parts
  • Modified test stubs and expectations to match the new quoted format

@segersniels segersniels linked an issue Jan 15, 2025 that may be closed by this pull request
3 tasks
@segersniels segersniels self-assigned this Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.43%. Comparing base (8435dd4) to head (1349714).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1392   +/-   ##
=======================================
  Coverage   92.43%   92.43%           
=======================================
  Files          29       29           
  Lines         291      291           
  Branches       66       66           
=======================================
  Hits          269      269           
  Misses         21       21           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@segersniels segersniels marked this pull request as draft January 15, 2025 16:19
@segersniels
Copy link
Collaborator Author

Not a fan of using shell as they advise against it in the documentation of execa. https://github.com/sindresorhus/execa/blob/99d1741d2525eca71b986282148bbf2983356428/docs/shell.md#avoiding-shells

@carloscuesta
Copy link
Owner

Seems that somehow now they do escape " the only option mentioned in the docs is using shell 😅

CleanShot 2025-01-15 at 22 30 44@2x

https://github.com/sindresorhus/execa/blob/main/docs/escaping.md#array-syntax

@segersniels
Copy link
Collaborator Author

Seems that somehow now they do escape " the only option mentioned in the docs is using shell 😅

CleanShot 2025-01-15 at 22 30 44@2x

https://github.com/sindresorhus/execa/blob/main/docs/escaping.md#array-syntax

I suppose we can merge it and revert once people start running into issues due to now configuring shell.

@segersniels segersniels marked this pull request as ready for review January 16, 2025 08:28
@segersniels segersniels merged commit 78cf5d9 into master Jan 16, 2025
3 checks passed
@segersniels segersniels deleted the fix/error-message-quotes branch January 16, 2025 08:30
@carloscuesta
Copy link
Owner

Let's see @segersniels just released this

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commit failed when I use it without add files before
2 participants