summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-02-26 16:05:26 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-02-28 11:19:49 -0800
commit8f2cdc75307dfba5d3867d0794dc6085795dc36f (patch)
tree94a1be6ab8507ba7a0e701b805e2d8539ec27c92 /lib
parent80547d21f52630d65a321975a6b9d19d9f2f49f4 (diff)
downloadchef-8f2cdc75307dfba5d3867d0794dc6085795dc36f.tar.gz
Chef-13: relative creates paths in the execute resource requires a cwd
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/exceptions.rb3
-rw-r--r--lib/chef/provider/execute.rb6
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index ae62f42b09..78bdf0cf4a 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -2,7 +2,7 @@
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: Seth Falcon (<seth@chef.io>)
# Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>)
-# Copyright:: Copyright 2008-2016, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,6 +47,7 @@ class Chef
class Cron < RuntimeError; end
class Env < RuntimeError; end
class Exec < RuntimeError; end
+ class Execute < RuntimeError; end
class ErlCall < RuntimeError; end
class FileNotFound < RuntimeError; end
class Package < RuntimeError; end
diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb
index 28dce5d18c..81bfd25158 100644
--- a/lib/chef/provider/execute.rb
+++ b/lib/chef/provider/execute.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,9 +39,9 @@ class Chef
end
def define_resource_requirements
- # @todo: this should change to raise in some appropriate major version bump.
if creates && creates_relative? && !cwd
- Chef::Log.warn "Providing a relative path for the creates attribute without the cwd is deprecated and will be changed to fail in the future (CHEF-3819)"
+ # FIXME? move this onto the resource?
+ raise Chef::Exceptions::Execute, "Please either specify a full path for the creates attribute, or specify a cwd propoerty to the #{new_resource} resource"
end
end