Skip to content

Commit 3d04fb7

Browse files
feat: move fingerprint debugging logs behind flag
1 parent 288bd5f commit 3d04fb7

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.changeset/wide-roses-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rock': patch
3+
---
4+
5+
move fingerprint debugging logs behind verbose flag

packages/cli/src/lib/plugins/fingerprint.ts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
type NativeFingerprintCommandOptions = {
1616
platform: 'ios' | 'android';
1717
raw?: boolean;
18+
debug?: boolean;
1819
};
1920

2021
export async function nativeFingerprintCommand(
@@ -34,17 +35,19 @@ export async function nativeFingerprintCommand(
3435
env,
3536
});
3637
console.log(fingerprint.hash);
37-
// log sources to stderr to avoid polluting the standard output
38-
console.error(
39-
JSON.stringify(
40-
{
41-
hash: fingerprint.hash,
42-
sources: fingerprint.inputs.filter((source) => source.hash != null),
43-
},
44-
null,
45-
2,
46-
),
47-
);
38+
if (options.debug) {
39+
// log sources to stderr to avoid polluting the standard output
40+
console.error(
41+
JSON.stringify(
42+
{
43+
hash: fingerprint.hash,
44+
sources: fingerprint.inputs.filter((source) => source.hash != null),
45+
},
46+
null,
47+
2,
48+
),
49+
);
50+
}
4851
return;
4952
}
5053

@@ -110,6 +113,10 @@ export const fingerprintPlugin = () => (api: PluginApi) => {
110113
name: '--raw',
111114
description: 'Output the raw fingerprint hash for piping',
112115
},
116+
{
117+
name: '--debug',
118+
description: 'Output additional debugging information',
119+
},
113120
],
114121
args: [
115122
{ name: '[path]', description: 'Directory to calculate fingerprint for' },

0 commit comments

Comments
 (0)