Skip to content

Commit

Permalink
Correctly bail out if there is no workspace.toml file found when upda…
Browse files Browse the repository at this point in the history
…ting the workspace. Closes #297
  • Loading branch information
orf committed Dec 11, 2022
1 parent b2229a5 commit 1dc7cf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ fn fetch(workspace: &Path, threads: usize) -> anyhow::Result<()> {
fn lock(workspace: &Path) -> anyhow::Result<()> {
// Find all config files
let config_files = all_config_files(workspace).context("Error loading config files")?;
if config_files.is_empty() {
anyhow::bail!("No configuration files found: Are you in the right workspace?")
}
// Read the configuration sources
let config = Config::new(config_files);
let sources = config
Expand Down

0 comments on commit 1dc7cf9

Please sign in to comment.