Skip to content

Commit

Permalink
fix: suppress punnycode warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
steve8708 committed Jul 10, 2024
1 parent 30d9a8e commit ab9f1b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import { outro } from '@clack/prompts';
import { isValidProject } from './helpers/validate-project';
import { invalidProjectWarningMessage } from './helpers/invalid-project-warning';

// Suppress punnycode warnings
const originalEmit = process.emitWarning;
process.emitWarning = function (...args) {
const [warning] = args;
const warningString = warning.toString();
if (warningString.includes('punnycode')) return;
return originalEmit.apply(process, args as any);
};

cli(
{
name: commandName,
Expand Down

0 comments on commit ab9f1b5

Please sign in to comment.