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

[FIX] web: fix tooling failing to run due to bash-specific syntax #86888

Conversation

sdegueldre
Copy link
Contributor

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.

@robodoo
Copy link
Contributor

robodoo commented Mar 22, 2022

@C3POdoo C3POdoo added the RD research & development, internal work label Mar 22, 2022
@C3POdoo C3POdoo requested a review from a team March 22, 2022 10:00
@aab-odoo
Copy link
Contributor

robodoo delegate=SimonGenin

@aab-odoo
Copy link
Contributor

Thanks @sdegueldre

@sdegueldre sdegueldre force-pushed the 15.0-web-tooling-precommit-crash-fix-sad branch from c03ebdc to 33baf18 Compare March 22, 2022 10:31
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.
@SimonGenin SimonGenin force-pushed the 15.0-web-tooling-precommit-crash-fix-sad branch from 33baf18 to 2b30a75 Compare March 22, 2022 10:46
@SimonGenin
Copy link
Contributor

@robodoo r+

@fw-bot
Copy link
Contributor

fw-bot commented Mar 26, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #86979, #86992

3 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented Mar 27, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #86979, #86992

@fw-bot
Copy link
Contributor

fw-bot commented Mar 28, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #86979, #86992

@fw-bot
Copy link
Contributor

fw-bot commented Mar 29, 2022

This pull request has forward-port PRs awaiting action (not merged or closed): #86979, #86992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants