(&self, args: I)
| 372 | } |
| 373 | |
| 374 | pub fn cargo_component<I, S>(&self, args: I) -> Command |
| 375 | where |
| 376 | I: IntoIterator<Item = S>, |
| 377 | S: AsRef<OsStr>, |
| 378 | { |
| 379 | let mut cmd = cargo_component(args); |
| 380 | // Set the cache dir and the config file env var for every command |
| 381 | if let Some(config_file) = self.config_file() { |
| 382 | cmd.env(CONFIG_FILE_ENV_VAR, config_file); |
| 383 | } |
| 384 | cmd.env(CACHE_DIR_ENV_VAR, self.cache_dir()); |
| 385 | cmd.current_dir(&self.root); |
| 386 | cmd |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | pub fn validate_component(path: &Path) -> Result<()> { |