Skip to content

Commit c4fcf5f

Browse files
committed
chore: remove console log
1 parent 45c46d2 commit c4fcf5f

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

packages/cli/src/utils/miscellaneous.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ export async function sendTelemetry(
593593
};
594594
const { otelTelemetry } = await import('../otel');
595595
otelTelemetry.init();
596-
console.log('JSON.stringify(cleanArgs(args)),', JSON.stringify(cleanArgs(args)));
597-
console.log('RAW_I', cleanRawInput(process.argv.slice(2), args));
598596
otelTelemetry.send(data.command, data);
599597
} catch (err) {
600598
// Do nothing.
@@ -680,15 +678,11 @@ export function cleanRawInput(argv: string[], parsedArgs: CommandOptions) {
680678
}
681679

682680
return argv
683-
.map((entry) => {
684-
for (const stringToMask of stringsToMask) {
685-
if (entry.includes(stringToMask)) {
686-
// Replace only the exact sensitive string with ***
687-
return entry.replace(stringToMask, '***');
688-
}
689-
}
690-
return entry.split('=').map(cleanString).join('=');
691-
})
681+
.map((entry) =>
682+
stringsToMask.find((mask) => entry.includes(mask))
683+
? entry.replace(stringsToMask.find((mask) => entry.includes(mask))!, '***')
684+
: entry.split('=').map(cleanString).join('=')
685+
)
692686
.join(' ');
693687
}
694688

0 commit comments

Comments
 (0)