Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

object to hash

  • Loading branch information...
commit 921b1ac41cc299f8e56c7337f6cb78a279b3ba23 1 parent 19593be
@dashuiwa dashuiwa authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/chef/jenkins.rb
View
2  lib/chef/jenkins.rb
@@ -170,7 +170,7 @@ def save_environment_file(env_to=Chef::Config[:jenkins][:env_to])
Chef::Log.info("Saving environmnent #{env_to} to #{env_to}.json")
dir = Chef::Config[:jenkins][:repo_dir]
- envto = Chef::Environment.load(env_to)
+ envto = Chef::Environment.load(env_to).to_hash
File.open(File.join(dir, "environments/#{envto}.json"), "w") do |env_file|
envto['cookbook_versions'] = Hash[envto['cookbook_versions'].sort]
env_file.print(JSON.pretty_generate(envto))
Please sign in to comment.
Something went wrong with that request. Please try again.