Skip to content

Commit 629480f

Browse files
authored
fix: write deprecation warning to stderr to avoid breaking E2E tests (#14836)
1 parent caf646f commit 629480f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/amplify-cli/src/index.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { EventEmitter } from 'events';
1818
import * as fs from 'fs-extra';
1919
import * as path from 'path';
2020
import { printer, prompter } from '@aws-amplify/amplify-prompts';
21+
import chalk from 'chalk';
2122
import { saveAll as saveAllEnvParams, ServiceUploadHandler } from '@aws-amplify/amplify-environment-parameters';
2223
import { logInput } from './conditional-local-logging-init';
2324
import { attachUsageData, constructContext } from './context-manager';
@@ -63,11 +64,14 @@ const disableCDKDeprecationWarning = () => {
6364
* Command line entry point
6465
*/
6566
export const run = async (startTime: number): Promise<void> => {
66-
printer.blankLine();
67-
printer.warn(
68-
'AWS Amplify Gen 1 CLI is in maintenance mode and will reach end of life on May 1, 2027.\n' +
69-
'During maintenance mode, only critical bug fixes and security patches will be provided.\n' +
70-
'Migrate to Amplify Gen 2: https://docs.amplify.aws/react/start/migrate-to-gen2/\n',
67+
process.stderr.write(
68+
'\n' +
69+
chalk.yellow(
70+
'⚠️ WARNING: AWS Amplify Gen 1 CLI is in maintenance mode and will reach end of life on May 1, 2027.\n' +
71+
'During maintenance mode, only critical bug fixes and security patches will be provided.\n' +
72+
'Migrate to Amplify Gen 2: https://docs.amplify.aws/react/start/migrate-to-gen2/',
73+
) +
74+
'\n\n',
7175
);
7276

7377
deleteOldVersion();

0 commit comments

Comments
 (0)