Skip to content

Commit

Permalink
only print deprecation if tty
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Apr 8, 2024
1 parent 025a12a commit 6bf35fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pkg-index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#! /usr/bin/env node

process.stderr.write('\x1b[41m\x1b[37m\x1b[1m DEPRECATION NOTICE: \x1b[0m \x1b[31m\x1b[1mThe Begin CLI is now available via npm\x1b[0m\n')
process.stderr.write('\x1b[1mPlease run "npm install -g @begin/deploy" to install the latest version\x1b[0m\n')
if (process.stdin.isTTY) {
process.stderr.write('\x1b[41m\x1b[37m\x1b[1m DEPRECATION NOTICE: \x1b[0m \x1b[31m\x1b[1mThe Begin CLI is now available via npm\x1b[0m\n')
process.stderr.write('\x1b[1mPlease run "npm install -g @begin/deploy" to install the latest version\x1b[0m\n')
}

const begin = require('./index')
begin()
require('./index')()

0 comments on commit 6bf35fd

Please sign in to comment.