Skip to content
Snippets Groups Projects
  • Samuel Degueldre's avatar
    92497ed4
    [FIX] web: fix tooling failing to run due to bash-specific syntax · 92497ed4
    Samuel Degueldre authored
    
    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 odoo/odoo#87436
    
    X-original-commit: 3104ab16
    Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
    92497ed4
    History
    [FIX] web: fix tooling failing to run due to bash-specific syntax
    Samuel Degueldre authored
    
    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 odoo/odoo#87436
    
    X-original-commit: 3104ab16
    Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>