fix(millis): do not create env

This commit is contained in:
Jan De Dobbeleer 2023-05-04 10:44:22 +02:00 committed by Jan De Dobbeleer
parent 98529e4a79
commit 289ca41709

View file

@ -38,6 +38,12 @@ This command is used to get the value of the following variables:
_ = cmd.Help()
return
}
if args[0] == "millis" {
fmt.Print(time.Now().UnixNano() / 1000000)
return
}
env := &platform.Shell{
CmdFlags: &platform.Flags{
Shell: shellName,
@ -46,9 +52,8 @@ This command is used to get the value of the following variables:
}
env.Init()
defer env.Close()
switch args[0] {
case "millis":
fmt.Print(time.Now().UnixNano() / 1000000)
case "shell":
fmt.Println(env.Shell())
case "accent":