git-watchtower 1.14.11 → 1.14.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/git-watchtower.js +14 -0
- package/package.json +1 -1
package/bin/git-watchtower.js
CHANGED
|
@@ -3644,6 +3644,20 @@ process.on('unhandledRejection', async (reason) => {
|
|
|
3644
3644
|
// ============================================================================
|
|
3645
3645
|
|
|
3646
3646
|
async function start() {
|
|
3647
|
+
// git-watchtower is a full-screen TUI. If stdout isn't a TTY (piped to a
|
|
3648
|
+
// file, `tee`, `head`, or captured by a non-interactive CI runner) every
|
|
3649
|
+
// frame writes hideCursor/clearScreen/moveTo/color escapes into the pipe,
|
|
3650
|
+
// producing an unreadable log and wasting CPU on a render loop no human
|
|
3651
|
+
// will see. Refuse to start and point the user at a sensible alternative.
|
|
3652
|
+
if (!process.stdout.isTTY) {
|
|
3653
|
+
console.error('git-watchtower: stdout is not a TTY.');
|
|
3654
|
+
console.error('');
|
|
3655
|
+
console.error(' This is an interactive terminal UI and cannot render when stdout is');
|
|
3656
|
+
console.error(' piped or redirected. If you only need a CI-friendly status check,');
|
|
3657
|
+
console.error(' use `git fetch` + `git log` directly.');
|
|
3658
|
+
process.exit(1);
|
|
3659
|
+
}
|
|
3660
|
+
|
|
3647
3661
|
// Check if git is available
|
|
3648
3662
|
const gitAvailable = await checkGitAvailable();
|
|
3649
3663
|
if (!gitAvailable) {
|
package/package.json
CHANGED