sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

pre-push hook waiting for user input causes

Open tdkt opened this issue 3 years ago • 0 comments

Version info

  • OS: macos 12.6
  • Build: Darwin 21.6.0

Description

I have a repository which has a pre-push script that waits for user input. When I push from sublime_merge, it will hang and quickly (a few seconds) start consuming up to a 100GB of RAM at which point the OS proposes to kill it.

Steps to reproduce

The pre-push script reads for input like so:

exec < /dev/tty # Allows us to read user input below, assigns stdin to keyboard
# and later
read -p "" input
case input in ...

use the push functionality in the program when such a pre-push script is enabled in the repo.

Expected behavior

Be free of hangs and memory leaks.

tdkt avatar Oct 04 '22 14:10 tdkt