The sqlmesh invalidate ENVIRONMENT command allows users to invalidate environments that do not exist. It will simply yield: Environment 'doesnotexist' invalidated.. This is confusing when you attempt invalidating an environment and mistype its name. Better would be: Environment 'doesnotexist' does not exist with an exit code.