Skip to content

Commit dbbd1ca

Browse files
committed
docs
1 parent 6c6631e commit dbbd1ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sqinn.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ func Launch(opt Options) (*Sqinn, error) {
8686
"linux/amd64": prebuiltLinux,
8787
"windows/amd64": prebuiltWindows,
8888
}
89+
filenameMap := map[string]string{
90+
"linux": "sqinn2",
91+
"windows": "sqinn2.exe",
92+
}
8993
platform := runtime.GOOS + "/" + runtime.GOARCH
9094
prebuilt, prebuiltFound := prebuiltMap[platform]
9195
if !prebuiltFound {
@@ -95,7 +99,7 @@ func Launch(opt Options) (*Sqinn, error) {
9599
if err != nil {
96100
return nil, err
97101
}
98-
tempname = filepath.Join(tempdir, "sqinn2")
102+
tempname = filepath.Join(tempdir, filenameMap[runtime.GOOS])
99103
if err := os.WriteFile(tempname, prebuilt, 0755); err != nil {
100104
return nil, err
101105
}

0 commit comments

Comments
 (0)