diff --git a/.changeset/wide-roses-hang.md b/.changeset/wide-roses-hang.md new file mode 100644 index 000000000..1f236b440 --- /dev/null +++ b/.changeset/wide-roses-hang.md @@ -0,0 +1,5 @@ +--- +'rock': patch +--- + +move fingerprint debugging logs behind debug flag diff --git a/packages/cli/src/lib/plugins/fingerprint.ts b/packages/cli/src/lib/plugins/fingerprint.ts index ed362839d..5df015f28 100644 --- a/packages/cli/src/lib/plugins/fingerprint.ts +++ b/packages/cli/src/lib/plugins/fingerprint.ts @@ -15,6 +15,7 @@ import { type NativeFingerprintCommandOptions = { platform: 'ios' | 'android'; raw?: boolean; + debug?: boolean; }; export async function nativeFingerprintCommand( @@ -34,17 +35,19 @@ export async function nativeFingerprintCommand( env, }); console.log(fingerprint.hash); - // log sources to stderr to avoid polluting the standard output - console.error( - JSON.stringify( - { - hash: fingerprint.hash, - sources: fingerprint.inputs.filter((source) => source.hash != null), - }, - null, - 2, - ), - ); + if (options.debug) { + // log sources to stderr to avoid polluting the standard output + console.error( + JSON.stringify( + { + hash: fingerprint.hash, + sources: fingerprint.inputs.filter((source) => source.hash != null), + }, + null, + 2, + ), + ); + } return; } @@ -110,6 +113,10 @@ export const fingerprintPlugin = () => (api: PluginApi) => { name: '--raw', description: 'Output the raw fingerprint hash for piping', }, + { + name: '--debug', + description: 'Output additional debugging information', + }, ], args: [ { name: '[path]', description: 'Directory to calculate fingerprint for' },