Prevent "validate" error on sudo
Validate prints "unexpected exit code" and a stacktrace on the "sudo whoami" step. This is caused by insufficient permissions on /tmp/validation.sh - when it is written, the "execute" flag is not set. I added a chmod after file creation to fix the permissions.
This commit is contained in:
Родитель
06f93ae0e2
Коммит
c2f7d28c3a
|
@ -9,7 +9,7 @@ Given /^a veeweebox was build$/ do
|
|||
end
|
||||
|
||||
When /^I sudorun "([^\"]*)" over ssh$/ do |command|
|
||||
@box.exec("echo '#{command}' > /tmp/validation.sh")
|
||||
@box.exec("echo '#{command}' > /tmp/validation.sh && chmod a+x /tmp/validation.sh")
|
||||
@sshresult=@box.exec(@box.sudo("/tmp/validation.sh"))
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче