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

Husky pre-push script prevents git push via VSCode command #8360

Closed
Jinksi opened this issue Mar 8, 2024 · 1 comment · Fixed by #8362
Closed

Husky pre-push script prevents git push via VSCode command #8360

Jinksi opened this issue Mar 8, 2024 · 1 comment · Fixed by #8362
Assignees
Labels
category: devops Features and tools supporting dev process. focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: developer experience

Comments

@Jinksi
Copy link
Member

Jinksi commented Mar 8, 2024

Describe the bug

The husky pre-push script added in #8287 prevents the VSCode command Git: push from working.

The following command output is shown:

> git push origin e2e/fix-shopper-bnpls-checkout:e2e/fix-shopper-bnpls-checkout
.husky/pre-push: line 5: /dev/tty: Device not configured
error: failed to push some refs to 'github.com:Automattic/woocommerce-payments.git'

# Allows us to read user input below, redirects script's input to the terminal.
exec < /dev/tty

Tip

Workaround: use terminal to run git push 🫢

To Reproduce

  1. Use VSCode and open this repo.
  2. Choose a branch, any branch.
  3. Open the command palette and run the command Git: push
  4. Notice the dialog Can't push refs to remote..
  5. Click Show command output to see the error message above.
@Jinksi Jinksi added priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. category: devops Features and tools supporting dev process. type: developer experience labels Mar 8, 2024
@timur27 timur27 self-assigned this Mar 8, 2024
@timur27
Copy link
Contributor

timur27 commented Mar 8, 2024

@Jinksi thanks for the issue! I was passing by and implemented a quick fix for this scenario. I hope it's fine that I added you as the reviewer.

@haszari haszari added the focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: devops Features and tools supporting dev process. focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants