equal
deleted
inserted
replaced
64 return line; |
64 return line; |
65 end |
65 end |
66 end |
66 end |
67 |
67 |
68 local function getpass() |
68 local function getpass() |
69 local stty_ret = os.execute("stty -echo 2>/dev/null"); |
69 local stty_ret, _, status_code = os.execute("stty -echo 2>/dev/null"); |
|
70 if status_code then -- COMPAT w/ Lua 5.1 |
|
71 stty_ret = status_code; |
|
72 end |
70 if stty_ret ~= 0 then |
73 if stty_ret ~= 0 then |
71 io.write("\027[08m"); -- ANSI 'hidden' text attribute |
74 io.write("\027[08m"); -- ANSI 'hidden' text attribute |
72 end |
75 end |
73 local ok, pass = pcall(io.read, "*l"); |
76 local ok, pass = pcall(io.read, "*l"); |
74 if stty_ret == 0 then |
77 if stty_ret == 0 then |