Skip to content

Commit d9cdeb8

Browse files
committed
Always print version string
1 parent 7abebaa commit d9cdeb8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ func mains() error {
9393
}
9494
flag.Parse()
9595

96+
fmt.Fprintf(os.Stderr, "expect.lua for Windows %s\n", version)
97+
9698
if *eOption == "" && len(flag.Args()) < 1 {
97-
return fmt.Errorf("%[1]s %[2]s\nUsage: %[1]s xxxx.lua", os.Args[0], version)
99+
return fmt.Errorf("Usage: %s xxxx.lua", os.Args[0])
98100
}
99101

100102
if *colorOption == "never" {
@@ -139,7 +141,7 @@ func mains() error {
139141
return err
140142
}
141143

142-
var version = "snapshot"
144+
var version = ""
143145

144146
func main() {
145147
if err := mains(); err != nil {

0 commit comments

Comments
 (0)