lib/cocoapods-binary/feature_switches.rb in cocoapods-binary-0.1.2 vs lib/cocoapods-binary/feature_switches.rb in cocoapods-binary-0.2
- old
+ new
@@ -1,5 +1,8 @@
+require_relative 'tool/tool'
+require_relative 'prebuild_sandbox'
+
module Pod
# a flag that indicate stages
class_attr_accessor :is_prebuild_stage
@@ -65,18 +68,19 @@
end
# option to disable write lockfiles
class Config
- @@force_disable_write_lockfile
+ @@force_disable_write_lockfile = false
def self.force_disable_write_lockfile(value)
@@force_disable_write_lockfile = value
end
old_method = instance_method(:lockfile_path)
define_method(:lockfile_path) do
if @@force_disable_write_lockfile
- return self.sandbox.root + 'Manifest.lock.bak'
+ # As config is a singleton, sandbox_root refer to the standard sandbox.
+ return PrebuildSandbox.from_standard_sanbox_path(sandbox_root).root + 'Manifest.lock.tmp'
else
return old_method.bind(self).()
end
end
end
\ No newline at end of file