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 {
156
156
) -> CommandOutput {
157
157
let cache_key = command. compute_cache_hash ( ) ;
158
158
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
+ {
160
162
command. mark_as_executed ( ) ;
161
163
if self . dry_run ( ) && !command. run_always {
162
164
return CommandOutput :: default ( ) ;
@@ -167,7 +169,7 @@ impl ExecutionContext {
167
169
168
170
let output = self . start ( command, stdout, stderr) . wait_for_output ( self ) ;
169
171
170
- if !self . dry_run ( ) || command. run_always {
172
+ if ( !self . dry_run ( ) || command. run_always ) && self . cache_cmd ( ) {
171
173
self . command_cache . insert ( cache_key, output. clone ( ) ) ;
172
174
}
173
175
You can’t perform that action at this time.
0 commit comments