This fixes an issue encountered during committing on WSL2 with PHPStorm. The message was:
.git/hooks/prepare-commit-msg: 2: cannot open /dev/tty: No such device or address
Committing directly from WSL works but it looks like the execution step of PHPStorm breaks the behavior at that point.
The PR adds a check if /dev/tty exists before using it.
This fixes an issue encountered during committing on WSL2 with PHPStorm. The message was:
.git/hooks/prepare-commit-msg: 2: cannot open /dev/tty: No such device or address
Committing directly from WSL works but it looks like the execution step of PHPStorm breaks the behavior at that point. The PR adds a check if /dev/tty exists before using it.