diff --git a/ci/release_notes.md b/ci/release_notes.md index 4087d99..12cf056 100644 --- a/ci/release_notes.md +++ b/ci/release_notes.md @@ -1 +1,3 @@ -Empty - please add release notes here +## Bug Fixes + +- Fix `Error: Couldn't find environment` after adding new environment to `cepler.yml` diff --git a/src/workspace.rs b/src/workspace.rs index 974345e..dd86925 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -187,10 +187,11 @@ impl Workspace { } else { return Ok(None); }; - let env = config - .environments - .get(env_name) - .context("Couldn't find environment")?; + let env = if let Some(env) = config.environments.get(env_name) { + env + } else { + return Ok(None); + }; let database = Database::open_env( &self.path_to_config, &env.name,