Skip to content

Commit

Permalink
Prevent unneeded fetching of Yarn version / index volta-cli#202
Browse files Browse the repository at this point in the history
  • Loading branch information
charlespierce committed Nov 28, 2018
1 parent ee62f75 commit 20785d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/notion-core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ impl Session {
}

if let Some(ref yarn_version) = &image.yarn {
let config = self.config.get()?;
let _ = catalog.fetch_yarn(&VersionSpec::exact(yarn_version), config)?;
if !catalog.yarn.contains(yarn_version) {
let config = self.config.get()?;
let _ = catalog.fetch_yarn(&VersionSpec::exact(yarn_version), config)?;
}
}

Ok(())
Expand Down

0 comments on commit 20785d9

Please sign in to comment.