@@ -82,7 +82,8 @@ impl ExecutionPlan {
8282
8383 let command = step. resolved_command . fingerprint . command . clone ( ) ;
8484 let cwd = step. resolved_command . fingerprint . cwd . clone ( ) ;
85- let pretty_command = format ! ( "~/{}$ {}" , cwd, command) ;
85+ let display_command: Option < String > =
86+ if step. is_builtin { None } else { Some ( format ! ( "~/{}$ {}" , cwd, command) ) } ;
8687 let ignore_replay = step. ignore_replay ;
8788
8889 // Check cache and prepare execution
@@ -98,28 +99,34 @@ impl ExecutionPlan {
9899 match cache_miss {
99100 Some ( CacheMiss :: NotFound ) => {
100101 tracing:: debug!( "{}" , "Cache not found" . style( Style :: new( ) . yellow( ) ) ) ;
101- println ! (
102- "{} {}" ,
103- "►" . style( Style :: new( ) . bright_blue( ) ) ,
104- pretty_command. style( Style :: new( ) . cyan( ) )
105- ) ;
102+ if let Some ( display_command) = display_command {
103+ println ! (
104+ "{} {}" ,
105+ "►" . style( Style :: new( ) . bright_blue( ) ) ,
106+ display_command. style( Style :: new( ) . cyan( ) )
107+ ) ;
108+ }
106109 }
107110 Some ( CacheMiss :: FingerprintMismatch ( mismatch) ) => {
108111 println ! ( "{}: {}" , "Cache miss" . style( Style :: new( ) . yellow( ) ) , mismatch) ;
109- println ! (
110- "{} {}" ,
111- "►" . style( Style :: new( ) . bright_blue( ) ) ,
112- pretty_command. style( Style :: new( ) . cyan( ) )
113- ) ;
112+ if let Some ( display_command) = display_command {
113+ println ! (
114+ "{} {}" ,
115+ "►" . style( Style :: new( ) . bright_blue( ) ) ,
116+ display_command. style( Style :: new( ) . cyan( ) )
117+ ) ;
118+ }
114119 }
115120 None => {
116121 if !ignore_replay {
117- println ! (
118- "{} {} {}" ,
119- "►" . style( Style :: new( ) . bright_green( ) ) ,
120- pretty_command. style( Style :: new( ) . dimmed( ) ) ,
121- "(Cache hit, replaying)" . style( Style :: new( ) . green( ) )
122- ) ;
122+ println ! ( "{}" , "Cache hit, replaying" . style( Style :: new( ) . green( ) ) ) ;
123+ if let Some ( display_command) = display_command {
124+ println ! (
125+ "{} {}" ,
126+ "►" . style( Style :: new( ) . bright_green( ) ) ,
127+ display_command. style( Style :: new( ) . dimmed( ) )
128+ ) ;
129+ }
123130 }
124131 }
125132 }
0 commit comments