File tree Expand file tree Collapse file tree 2 files changed +23
-11
lines changed
packages/cli/src/lib/plugins Expand file tree Collapse file tree 2 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' rock ' : patch
3+ ---
4+
5+ move fingerprint debugging logs behind debug flag
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515type NativeFingerprintCommandOptions = {
1616 platform : 'ios' | 'android' ;
1717 raw ?: boolean ;
18+ debug ?: boolean ;
1819} ;
1920
2021export 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' } ,
You can’t perform that action at this time.
0 commit comments