File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ impl ExecutionContext {
156156 ) -> CommandOutput {
157157 let cache_key = command. compute_cache_hash ( ) ;
158158
159- if let Some ( cached_output) = self . command_cache . get ( cache_key) {
159+ if self . cache_cmd ( )
160+ && let Some ( cached_output) = self . command_cache . get ( cache_key)
161+ {
160162 command. mark_as_executed ( ) ;
161163 if self . dry_run ( ) && !command. run_always {
162164 return CommandOutput :: default ( ) ;
@@ -167,7 +169,7 @@ impl ExecutionContext {
167169
168170 let output = self . start ( command, stdout, stderr) . wait_for_output ( self ) ;
169171
170- if !self . dry_run ( ) || command. run_always {
172+ if ( !self . dry_run ( ) || command. run_always ) && self . cache_cmd ( ) {
171173 self . command_cache . insert ( cache_key, output. clone ( ) ) ;
172174 }
173175
You can’t perform that action at this time.
0 commit comments