124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# File 'lib/vagrant-unison2/command.rb', line 124
def execute
with_target_vms do |machine|
guest_path = UnisonPaths.new(@env, machine).guest
command = "rm -rf ~/Library/'Application Support'/Unison/*"
@env.ui.info "Running #{command} on host"
system(command)
command = "rm -rf #{guest_path}/* #{guest_path}/..?* #{guest_path}/.[!.]*"
@env.ui.info "Running #{command} on guest VM (delete all files from directory including hidden ones)"
machine.communicate.sudo(command)
command = "rm -rf ~/.unison"
@env.ui.info "Running #{command} on guest VM"
machine.communicate.execute(command)
end
0
end
|