summaryrefslogtreecommitdiff
path: root/omnibus
diff options
context:
space:
mode:
authorScott Hain <shain@chef.io>2016-04-25 11:44:39 -0700
committerScott Hain <shain@chef.io>2016-04-26 10:53:15 -0700
commita88ff4f95f2b881a52e1820446b3973f6b561faf (patch)
tree71fa393c43be6a26d8e28d6f3d9e88342551aa34 /omnibus
parent32fbc8908cc41c218951d5e2c9413e7efc6df5f1 (diff)
downloadchef-a88ff4f95f2b881a52e1820446b3973f6b561faf.tar.gz
Update override pathshain/fix_dependency_path
Diffstat (limited to 'omnibus')
-rw-r--r--omnibus/config/projects/chef.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index fa6f30b322..561dea8901 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -22,6 +22,9 @@ license "Apache-2.0"
license_file "../LICENSE"
build_iteration 1
+# Do not use __FILE__ after this point, use current_file. If you use __FILE__
+# after this point, any dependent defs (ex: angrychef) that use instance_eval
+# will fail to work correctly.
current_file ||= __FILE__
version_file = File.expand_path("../../../../VERSION", current_file)
build_version IO.read(version_file).strip
@@ -42,7 +45,7 @@ if windows? || rhel?
end
# Load dynamically updated overrides
-overrides_path = File.expand_path("../../../../omnibus_overrides.rb", __FILE__)
+overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_file)
instance_eval(IO.read(overrides_path), overrides_path)
override :"ruby-windows-devkit", version: "4.5.2-20111229-1559" if windows? && windows_arch_i386?