Mercurial Hosting > luan
comparison src/luan/modules/http/tools/Shell.luan @ 1521:d3e61cd2aca0
docs and shell bug fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 25 Jun 2020 23:17:14 -0600 |
parents | d9a5405a3102 |
children | c922446f53aa |
comparison
equal
deleted
inserted
replaced
1520:d9a5405a3102 | 1521:d3e61cd2aca0 |
---|---|
31 | 31 |
32 local fns = {} | 32 local fns = {} |
33 | 33 |
34 function fns.run(cmd) | 34 function fns.run(cmd) |
35 try | 35 try |
36 local line | |
36 try | 37 try |
37 return load("return "..cmd,"<web_shell>",env) | 38 line = load("return "..cmd,"<web_shell>",env) |
38 catch e | 39 catch e |
39 return load(cmd,"<web_shell>",env) | 40 line = load(cmd,"<web_shell>",env) |
40 end | 41 end |
42 return line() | |
41 catch e | 43 catch e |
42 -- Io.print_to(Io.stderr,e) | 44 -- Io.print_to(Io.stderr,e) |
43 return to_string(e) | 45 return to_string(e) |
44 end | 46 end |
45 end | 47 end |