File tree 9 files changed +22
-10
lines changed
9 files changed +22
-10
lines changed Original file line number Diff line number Diff line change
1
+ kind : Added
2
+ body : Windows support.
3
+ time : 2024-09-07T16:16:36.18073-07:00
Original file line number Diff line number Diff line change
1
+ # Don't magically change line endings by default.
2
+ #
3
+ # Ref:
4
+ # - https://github.com/golang/go/blob/807e01db4840e25e4d98911b28a8fa54244b8dfa/.gitattributes
5
+ # - https://github.com/rogpeppe/go-internal/pull/106
6
+ * - text
7
+
1
8
* .png filter =lfs diff =lfs merge =lfs - text
Original file line number Diff line number Diff line change 40
40
name : Test (${{ matrix.os}})
41
41
strategy :
42
42
matrix :
43
- os : ["ubuntu-latest"] # TODO: [ "windows-latest"]
43
+ os : ["ubuntu-latest", "windows-latest"]
44
44
steps :
45
45
- uses : actions/checkout@v4
46
46
- name : Set up Go
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ builds:
6
6
- CGO_ENABLED=0
7
7
main : .
8
8
binary : gs
9
- goos : [darwin, linux]
9
+ goos : [darwin, linux, windows ]
10
10
goarch : [amd64, arm64, arm]
11
11
goarm : [5, 6, 7]
12
12
ldflags : ' -s -w -X main._version={{.Version}}'
13
13
ignore :
14
14
- goos : darwin
15
15
goarch : arm
16
+ - goos : windows
17
+ goarch : arm
16
18
flags :
17
19
- -trimpath
18
20
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ require (
9
9
github.com/charmbracelet/bubbletea v1.1.0
10
10
github.com/charmbracelet/lipgloss v0.13.0
11
11
github.com/charmbracelet/log v0.4.0
12
- github.com/creack/pty v1.1.23
12
+ github.com/creack/pty/v2 v2.0.0-20231028221118-e9c1f000f465
13
13
github.com/dustin/go-humanize v1.0.1
14
14
github.com/mattn/go-isatty v0.0.20
15
15
github.com/rogpeppe/go-internal v1.12.0
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ github.com/charmbracelet/x/ansi v0.2.3 h1:VfFN0NUpcjBRd4DnKfRaIRo53KRgey/nhOoEqo
24
24
github.com/charmbracelet/x/ansi v0.2.3 /go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw =
25
25
github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0 =
26
26
github.com/charmbracelet/x/term v0.2.0 /go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0 =
27
- github.com/creack/pty v1.1.23 h1:4M6+isWdcStXEf15G/RbrMPOQj1dZ7HPZCGwE4kOeP0 =
28
- github.com/creack/pty v1.1.23 /go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE =
27
+ github.com/creack/pty/v2 v2.0.0-20231028221118-e9c1f000f465 h1:KQ+iWxxc2qYyfK3GGrjNJ73GvDAd9Ecz8pK4FpdtI6Y =
28
+ github.com/creack/pty/v2 v2.0.0-20231028221118-e9c1f000f465 /go.mod h1:zTYJ0iXAFhiKeguJdMR/LEecltLOG5Wz3lo1lIi0CLU =
29
29
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE =
30
30
github.com/danieljoos/wincred v1.2.0 /go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec =
31
31
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ func DefaultConfig() Config {
11
11
return Config {
12
12
"init.defaultBranch" : "main" ,
13
13
"alias.graph" : "log --graph --decorate --oneline" ,
14
+ "core.autocrlf" : "false" ,
14
15
}
15
16
}
16
17
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
17
17
"sync"
18
18
"time"
19
19
20
- "github.com/creack/pty"
20
+ "github.com/creack/pty/v2 "
21
21
"github.com/vito/midterm"
22
22
)
23
23
@@ -254,14 +254,14 @@ func WithTerm() (exitCode int) {
254
254
type terminalEmulator struct {
255
255
mu sync.Mutex
256
256
cmd * exec.Cmd
257
- pty * os. File
257
+ pty pty. Pty
258
258
logf func (string , ... any )
259
259
260
260
term * midterm.Terminal
261
261
}
262
262
263
263
func newVT100Emulator (
264
- f * os. File ,
264
+ f pty. Pty ,
265
265
cmd * exec.Cmd ,
266
266
rows , cols int ,
267
267
autoResize bool ,
@@ -329,7 +329,6 @@ func (m *terminalEmulator) Close() error {
329
329
330
330
func (m * terminalEmulator ) FeedKeys (s string ) error {
331
331
_ , err := io .WriteString (m .pty , s )
332
- _ = m .pty .Sync ()
333
332
return err
334
333
}
335
334
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ gs auth login --forge=shamhub
41
41
cmp stderr $WORK/golden/login-secure.stderr
42
42
43
43
-- golden/login.stderr --
44
- WRN Storing secrets in plain text at $WORK/ home/ .config/ git-spice/ secrets.json. Be careful!
44
+ WRN Storing secrets in plain text at $WORK${/} home${/} .config${/} git-spice${/} secrets.json. Be careful!
45
45
INF shamhub: successfully logged in
46
46
-- golden/login-secure.stderr --
47
47
INF shamhub: successfully logged in
You can’t perform that action at this time.
0 commit comments