Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit 806156e

Browse files
committed
fix: restore expected logic
1 parent 602d979 commit 806156e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/link.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashMap;
22
use std::path::PathBuf;
33

4-
use anyhow::{anyhow, ensure, Result};
4+
use anyhow::{anyhow, bail, Result};
55

66
use pathdiff::diff_paths;
77

@@ -205,10 +205,9 @@ pub fn link_typescript_project_references(opts: opts::Link) -> Result<()> {
205205
let is_dependencies_link_success = link_package_dependencies(&opts, &lerna_manifest)
206206
.expect("Unable to link internal package dependencies");
207207

208-
ensure!(
209-
opts.check_only && !(is_children_link_success && is_dependencies_link_success),
210-
"Found out-of-date project references"
211-
);
208+
if opts.check_only && !(is_children_link_success && is_dependencies_link_success) {
209+
bail!("Found out-of-date project references")
210+
}
212211

213212
// TODO(7): create `tsconfig.settings.json` files
214213

0 commit comments

Comments
 (0)