From a23cfd869f90ae4456dded6e5a1c82719b128f01 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Wed, 1 Jun 2011 11:04:18 -0700 Subject: (#7177) Deprecate implicit 'puppet apply' for 2.7.0 Back in prehistory (eg: 0.25 era), 'puppet' was the name for the agent, and could be used directly to apply a manifest as well as to communicate with the puppet master process. During the 2.6 series we moved to a single binary, but continued to support older scripts by detecting invocations that looked like the traditional scripting uses and implicitly turning those into a call to 'puppet apply'. Now, with the 2.7.0 release, we are moving to deprecate that behaviour. We still do the same detection, and still run the old manifests, but we now emit a deprecation warning directing people to use 'puppet apply' directly. We intend to remove the behaviour entirely in the 2.8 release, which also paves the way to nicer handling of the command line. Reviewed-By: Randall Hansen Reviewed-By: Nick Fagerlund --- lib/puppet/util/command_line.rb | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'lib/puppet/util/command_line.rb') diff --git a/lib/puppet/util/command_line.rb b/lib/puppet/util/command_line.rb index c475dacc4..372aa5122 100644 --- a/lib/puppet/util/command_line.rb +++ b/lib/puppet/util/command_line.rb @@ -94,12 +94,27 @@ module Puppet if zero == 'puppet' case argv.first when nil then - # ttys get usage info - [stdin.tty? ? nil : "apply", argv] + if stdin.tty? then + [nil, argv] # ttys get usage info + else + # Killed for 2.7.0 --daniel 2011-06-01 + Puppet.deprecation_warning <