Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for /dev/stdout (#11) #17

Merged
merged 3 commits into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/Example2/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ desc "Run the EditorRun.Build task"
lane :u3d_build do |options|
u3d(raw_logs: options[:raw_logs], run_args: "-logFile './editor.log' -executeMethod U3d.EditorRun.Build -quit -batchmode")
end

lane :u3d_build2 do |options|
u3d(raw_logs: options[:raw_logs], run_args: "-logFile '/dev/stdout' -executeMethod U3d.EditorRun.Build -quit -batchmode")
end
5 changes: 3 additions & 2 deletions lib/u3d/unity_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def run(installation, args, raw_logs: false)
log_file = find_logFile_in_args(args)

if log_file # we wouldn't want to do that for the default log file.
File.delete(log_file) if File.exist?(log_file)
File.delete(log_file) if File.file?(log_file) # We only delete real files
else
log_file = installation.default_log_file
end
Expand Down Expand Up @@ -59,7 +59,8 @@ def run(installation, args, raw_logs: false)
else
args.map!(&:shellescape)
end
U3dCore::CommandExecutor.execute(command: args)
# FIXME return value not handled
U3dCore::CommandExecutor.execute(command: args, print_all: true)
ensure
sleep 0.5
Thread.kill(tail_thread)
Expand Down