Use id instead of whoami
parent
4fa58efaa0
commit
60d2856444
|
@ -720,6 +720,12 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
|
||||
|
||||
def whoami
|
||||
@platform == :windows ? (session.sys.config.getenv('USERNAME')) : (cmd_exec("whoami").chomp)
|
||||
if @platform == :windows
|
||||
id = session.sys.config.getenv('USERNAME')
|
||||
else
|
||||
id = cmd_exec("id -un")
|
||||
end
|
||||
|
||||
id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue