Skip to content

Commit

Permalink
deprecation notice from printer in main begin fn
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Apr 16, 2024
1 parent 35a7b15 commit 997f184
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ async function begin (params = {}) {
let cliDir = process.env.BEGIN_INSTALL || join(homedir(), '.begin')
let isCI = args.input === false || (process.env.CI || !process.stdout.isTTY) || false
let params = { args, appVersion: version, cliDir, clientIDs, isCI, lang, printer }
if (process.env.BEGIN_CLI_TYPE === 'BINARY') {
printer('\x1b[41m\x1b[37m\x1b[1m DEPRECATION NOTICE: \x1b[0m \x1b[31m\x1b[1mThe Begin Deploy CLI is now updated via npm\x1b[0m')
printer('\x1b[1mPlease run "npm install -g @begin/deploy" to install the latest version\x1b[0m\n')
}
await commands(params)
telemetry.end(params)
}
Expand Down
10 changes: 1 addition & 9 deletions src/pkg-index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#! /usr/bin/env node

if (process.env.NODE_ENV !== 'testing') {
console.log('console.log')
console.error('console.error')
process.stderr.write('process.stderr.write\n')
process.stdout.write('process.stdout.write\n')

console.error('\x1b[41m\x1b[37m\x1b[1m DEPRECATION NOTICE: \x1b[0m \x1b[31m\x1b[1mThe Begin Deploy CLI is now updated via npm\x1b[0m')
console.error('\x1b[1mPlease run "npm install -g @begin/deploy" to install the latest version\x1b[0m\n')
}
process.env.BEGIN_CLI_TYPE = 'BINARY'

require('./index')()

0 comments on commit 997f184

Please sign in to comment.