File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ impl<'a> BootstrapCommand {
101101 self . should_cache
102102 }
103103
104+ pub fn cache_never ( & mut self ) -> & mut Self {
105+ self . should_cache = false ;
106+ self
107+ }
108+
104109 pub fn args < I , S > ( & mut self , args : I ) -> & mut Self
105110 where
106111 I : IntoIterator < Item = S > ,
@@ -203,10 +208,11 @@ impl<'a> BootstrapCommand {
203208 /// Provides access to the stdlib Command inside.
204209 /// FIXME: This function should be eventually removed from bootstrap.
205210 pub fn as_command_mut ( & mut self ) -> & mut Command {
206- // We don't know what will happen with the returned command, so we need to mark this
207- // command as executed proactively.
211+ // We proactively mark this command as executed since we can't be certain how the returned
212+ // command will be handled. Caching must also be avoided here, as the inner command could be
213+ // modified externally without us being aware.
208214 self . mark_as_executed ( ) ;
209- self . should_cache = false ;
215+ self . cache_never ( ) ;
210216 & mut self . command
211217 }
212218
You can’t perform that action at this time.
0 commit comments