Title: output suppressed until pre-commit scripts fully ran · Issue #1333 · commitizen-tools/commitizen · GitHub
Open Graph Title: output suppressed until pre-commit scripts fully ran · Issue #1333 · commitizen-tools/commitizen
X Title: output suppressed until pre-commit scripts fully ran · Issue #1333 · commitizen-tools/commitizen
Description: Description Hi, I've configured cz to run some custom pre-commit scripts, and these scripts work as expected if directly called via .git/hooks/pre-commit or via "git commit -m ..." if i use instead cz, after its questions and my answers,...
Open Graph Description: Description Hi, I've configured cz to run some custom pre-commit scripts, and these scripts work as expected if directly called via .git/hooks/pre-commit or via "git commit -m ..." if i use instead...
X Description: Description Hi, I've configured cz to run some custom pre-commit scripts, and these scripts work as expected if directly called via .git/hooks/pre-commit or via "git commit -m ..." if...
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1333
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"output suppressed until pre-commit scripts fully ran","articleBody":"### Description\n\nHi, I've configured cz to run some custom pre-commit scripts, and these scripts work as expected if directly called via .git/hooks/pre-commit or via \"git commit -m ...\"\r\n\r\nif i use instead cz, after its questions and my answers, it produces its \"purple\" commit message, then the SAME hooks scripts start running but i can't see any output until the script as fully completed its run...\r\n\r\nas some tasks in these scripts are very long to run, i'd like to have some output given to the user on what's going on in the background...\r\n\r\nthanks in advance\n\n### Steps to reproduce\n\n1. .git/hooks/pre-commit #. works and produces its own output\r\n2. git commit -m \"something\" #. works and produces its own output\r\n3. cz c (and following Q\u0026A) # waits for script completion before producing output\n\n### Current behavior\n\nthis fully works if called manually or via git commit, producing the desired output, while does not until fully completed in case of using \"cz c\"\r\n```\r\n#!/usr/bin/env bash\r\n\r\nsource \"${HOME}/.aliases.sh\"\r\n\r\nfunction main() {\r\n if [ -n \"${REMOTE_CONTAINERS}\" ]; then\r\n printf \"${COLOR_GREEN}%s${COLOR_NONE}\\n\" \"Updating Helm dependencies... Please be patient...\"\r\n if ! updateCharts\r\n then\r\n printf '\\n%s\\n' \"${COLOR_RED}----------------------------${COLOR_NONE}\"\r\n printf '%s\\n' \"${COLOR_RED}!!! Cannot update charts !!!${COLOR_NONE}\"\r\n printf '%s\\n' \"${COLOR_RED}----------------------------${COLOR_NONE}\"\r\n exit 1\r\n else \r\n git add \"${WORKSPACE}/infrastructure/helm/Chart.lock\"\r\n git add \"${WORKSPACE}/infrastructure/helm/charts\"\r\n fi\r\n if ! testTemplates\r\n then\r\n exit 1\r\n fi\r\n fi\r\n}\r\n\r\nfunction testTemplates() {\r\n result=true\r\n for f in \"${WORKSPACE}/infrastructure/helm/values/\"*\r\n do\r\n if [ ! -d \"${f}\" ];\r\n then\r\n filename=$(basename -- \"${f}\")\r\n env=\"${filename%.*}\"\r\n if ! template -n \"precommit\" \"${env}\"\r\n then\r\n result=false\r\n printf '\\n%s\\n' \"${COLOR_RED}----------------------------------------------${COLOR_NONE}\"\r\n printf '%s\\n' \"${COLOR_RED}!!! Templating of ${env} environment failed !!!${COLOR_NONE}\"\r\n printf '%s\\n' \"${COLOR_RED}----------------------------------------------${COLOR_NONE}\"\r\n fi\r\n fi\r\n done\r\n rm -rf \"${WORKSPACE}/template/\"*\"precommit\"*\r\n $result\r\n}\r\n\r\nmain\r\n\r\n```\n\n### Desired behavior\n\nhaving my output on console while scripts run, so users are aware of what's going on\n\n### Screenshots\n\n_No response_\n\n### Environment\n\nCommitizen Version: 4.1.0\r\nPython Version: 3.13.1 (main, Jan 7 2025, 11:12:45) [GCC 12.2.0]\r\nOperating System: Linux","author":{"url":"https://github.com/fragolinux","@type":"Person","name":"fragolinux"},"datePublished":"2025-01-08T11:18:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1333/commitizen/issues/1333"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cec4052d-492d-0c8e-d2d0-2ec0180cb7bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D30:121B7:13B9A92:1B13EEF:6A4DE76C |
| html-safe-nonce | da31bd90b6aee8b5b6f4a49101b769545f41656ea762bf2f45a9f00beb443676 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDMwOjEyMUI3OjEzQjlBOTI6MUIxM0VFRjo2QTRERTc2QyIsInZpc2l0b3JfaWQiOiI3NDA3NDMzNjg4MDYzNzk3MTAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a1cb05b2e1d2f52dbc574973b3875183d162eb1d32d298490d43fee3289e9cba |
| hovercard-subject-tag | issue:2775131867 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/1333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/083a279ccff5e704f403fc1a2c037499ba1af523939cc2d3bcff874b1c80b095/commitizen-tools/commitizen/issues/1333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/083a279ccff5e704f403fc1a2c037499ba1af523939cc2d3bcff874b1c80b095/commitizen-tools/commitizen/issues/1333 |
| og:image:alt | Description Hi, I've configured cz to run some custom pre-commit scripts, and these scripts work as expected if directly called via .git/hooks/pre-commit or via "git commit -m ..." if i use instead... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fragolinux |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width