diff src/luan/modules/http/tools/Shell.luan @ 1277:5ba660381bd5

fix Io.print()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 11 Dec 2018 03:38:43 -0700
parents 2de84f128be3
children 007ceb8dcf89
line wrap: on
line diff
--- a/src/luan/modules/http/tools/Shell.luan	Mon Dec 10 15:04:09 2018 -0700
+++ b/src/luan/modules/http/tools/Shell.luan	Tue Dec 11 03:38:43 2018 -0700
@@ -6,6 +6,9 @@
 local try = Luan.try or error()
 local String = require "luan:String.luan"
 local concat = String.concat or error()
+local Table = require "luan:Table.luan"
+local pack = Table.pack or error()
+local unpack = Table.unpack or error()
 local Time = require "luan:Time.luan"
 local Thread = require "luan:Thread.luan"
 local Io = require "luan:Io.luan"
@@ -51,7 +54,10 @@
 					line = load(cmd,"<web_shell>",env)
 				end
 			}
-			print( line() )
+			local rtn = pack( line() )
+			if rtn.n > 0  then
+				print( unpack(rtn) )
+			end
 		end
 		catch = function(e)
 			Io.print_to(Io.stderr,e)