Skip to content

adam-contio-ai/ora-pre-commit-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ora Pre-commit Test Project

This project demonstrates an issue where ora spinners may interfere with pre-commit hooks.

Files Created

  • package.json - Contains ora dependency
  • .pre-commit-config.yaml - Pre-commit configuration with three hooks
  • hooks/immediate-echo.sh - Hook that echoes "finished" immediately
  • hooks/delayed-echo.sh - Hook that waits 10 seconds then echoes "finished"
  • hooks/spinner-hook.sh - Hook that runs the ora spinner
  • test-spinner.js - Test script that runs an ora spinner for 15 seconds

Setup

  1. Install pre-commit (if not already installed):

    pip install pre-commit
  2. Install dependencies:

    npm install
  3. Install pre-commit hooks:

    pre-commit install
  4. Confirm ora is working as expected:

    node ./test-spinner.js

To Reproduce the Bug

Run the spinner hook directly:

pre-commit run spinner-hook --all-files

This will execute the ora spinner within the pre-commit hook environment, demonstrating the issue where the spinner may hang or not complete properly.

Alternative Test Methods

  1. Run all hooks:

    pre-commit run --all-files
  2. Make a test commit:

    git add .
    git commit -m "Test commit"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors