Commit 3239f415 authored by anonym's avatar anonym
Browse files

Make it possible to run() multiple lines.

parent a1b76f34
......@@ -44,10 +44,11 @@ module Dogtail
def run(python_expr = nil)
def run(lines = nil)
@opts[:user] ||= LIVE_USER
python_expr ||= build_line
script = build_script([python_expr])
lines ||= [build_line]
lines = [lines] if lines.class != Array
script = build_script(lines)
script_path = $vm.execute_successfully('mktemp', @opts).stdout.chomp
$vm.file_overwrite(script_path, script, @opts[:user])
args = ["/usr/bin/python '#{script_path}'", @opts]
Supports Markdown
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