Skip to content

Commit 1dc7cf9

Browse files
committed
Correctly bail out if there is no workspace.toml file found when updating the workspace. Closes #297
1 parent b2229a5 commit 1dc7cf9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Cargo.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ fn fetch(workspace: &Path, threads: usize) -> anyhow::Result<()> {
295295
fn lock(workspace: &Path) -> anyhow::Result<()> {
296296
// Find all config files
297297
let config_files = all_config_files(workspace).context("Error loading config files")?;
298+
if config_files.is_empty() {
299+
anyhow::bail!("No configuration files found: Are you in the right workspace?")
300+
}
298301
// Read the configuration sources
299302
let config = Config::new(config_files);
300303
let sources = config

0 commit comments

Comments
 (0)