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][FIX] web: fix tooling failing to run due to bash-specific syntax #87436

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 29, 2022

In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.

After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.

Forward-Port-Of: #86888

In odoo#86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.

After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.

X-original-commit: 3104ab1
@robodoo
Copy link
Contributor

robodoo commented Mar 29, 2022

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 29, 2022

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Mar 29, 2022
@C3POdoo C3POdoo added the RD research & development, internal work label Mar 29, 2022
@SimonGenin
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request Mar 29, 2022
In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.

After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.

closes #87436

X-original-commit: 3104ab1
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
@robodoo robodoo closed this Mar 29, 2022
@robodoo robodoo temporarily deployed to merge March 29, 2022 10:59 Inactive
@robodoo robodoo added the 15.3 label Mar 29, 2022
@sdegueldre sdegueldre deleted the master-15.0-web-tooling-precommit-crash-fix-sad-xCZr-fw branch March 30, 2022 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
15.3 forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants