Skip to content

Instantly share code, notes, and snippets.

@kylog
Created February 18, 2016 00:49
Show Gist options
  • Select an option

  • Save kylog/2888fefb4d87bcaf38e3 to your computer and use it in GitHub Desktop.

Select an option

Save kylog/2888fefb4d87bcaf38e3 to your computer and use it in GitHub Desktop.
strict_environment_mode logic
if !strict_environment_mode
# do like today
else
if environment was not specified and use_cached_catalog == false
# do like today
elif environment was specified and use_cached_catalog == true
if environment != catalog.environment
raise
end
else # we have only one source of environment, woot
# use that, skipping node request, and failing if catalog convergence doesn't happen
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment