Prevent installer to be run from inside sandbox directory

parent b917ffd9
...@@ -114,6 +114,12 @@ module Pod ...@@ -114,6 +114,12 @@ module Pod
end end
def prepare def prepare
# Raise if pwd is inside Pods
if (Pathname.pwd <=> sandbox.root) >= 0
message = 'Command should be run from a directory outside Pods directory.'
message << "\n\n\tCurrent directory is '#{Pathname.pwd}'\n"
raise Informative, message
end
UI.message 'Preparing' do UI.message 'Preparing' do
sandbox.prepare sandbox.prepare
ensure_plugins_are_installed! ensure_plugins_are_installed!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment