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

[FW][IMP] husky: allow use of pre-commit hook for windows #1519

Closed

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Jul 19, 2022

The PATH variable for husky in windows was missing the "/usr/bin" directory.

Add a HUSKY_INPUT_ENV environment variable to disable user input in
the pre-commit hook. It should be set to 0 if:

  • You are using windows. ATM the user input of the hook uses Unix specific
    commands
  • You use git with a GUI, in which you cannot use console input for commits

Description:

description of this task, what is implemented and why it is implemented that way.

Odoo task ID : TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_lt("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Forward-Port-Of: #1442

The PATH variable for husky in windows was sometimes missing the
"/usr/bin" directory. I'm not sure what caused this, I had the bug sometimes
but couldn't reproduce it consistently.

On Windows, use `npx.cmd` instead of `npx`.

Add a HUSKY_INPUT_ENV environment variable to disable user input in
the pre-commit hook. It should be set to 0 if you use git with a GUI,
in which you cannot use console input for commits

X-original-commit: 6209577
@robodoo
Copy link
Collaborator

robodoo commented Jul 19, 2022

@fw-bot
Copy link
Collaborator Author

fw-bot commented Jul 19, 2022

This PR targets saas-15.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@fw-bot
Copy link
Collaborator Author

fw-bot commented Jul 19, 2022

Ping @hokolomopo, @rrahir
The next pull request (#1520) is in conflict. You can merge the chain up to here by saying

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@rrahir
Copy link
Collaborator

rrahir commented Jul 19, 2022

@fw-bot r+

robodoo pushed a commit that referenced this pull request Jul 19, 2022
The PATH variable for husky in windows was sometimes missing the
"/usr/bin" directory. I'm not sure what caused this, I had the bug sometimes
but couldn't reproduce it consistently.

On Windows, use `npx.cmd` instead of `npx`.

Add a HUSKY_INPUT_ENV environment variable to disable user input in
the pre-commit hook. It should be set to 0 if you use git with a GUI,
in which you cannot use console input for commits

closes #1519

X-original-commit: 6209577
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
@robodoo robodoo closed this Jul 19, 2022
@robodoo robodoo temporarily deployed to merge July 19, 2022 15:10 Inactive
@fw-bot fw-bot deleted the saas-15.3-master-husky-hook-windows-adrm-1rSo-fw branch August 2, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants