New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template verify variable name mismatch #3232

Closed
Tech356 opened this Issue Apr 16, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@Tech356

Tech356 commented Apr 16, 2015

RFC 27 states

The path to the temporary file with the proposed content will be available
by using Ruby's sprinf formatting:

"%{path}"

And the documentation show an example

template "/etc/nginx.conf" do
  verify "nginx -t -c %{path}"
end

But the code gives file instead of path

def verify_command(path, opts)
    command = @command % {:file => path}
    interpreter = Chef::GuardInterpreter.for_resource(@parent_resource, command, @command_opts)
    interpreter.evaluate
end
@stevendanna

This comment has been minimized.

Member

stevendanna commented Apr 16, 2015

Thanks @Tech356. Let's add :path and keep :file to avoid breaking anyone else who managed to figure out the right option. Sorry about this.

@Tech356 Tech356 closed this Jul 28, 2015

natewalck pushed a commit to natewalck/chef that referenced this issue Aug 11, 2015

natewalck pushed a commit to natewalck/chef that referenced this issue Aug 11, 2015

@chef chef locked and limited conversation to collaborators Nov 16, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.