2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-22 15:56:24 +00:00

fix windows build

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-09-10 12:16:41 +02:00
parent 13efc1a646
commit d9f253d65c
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF
3 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package run
import ( import (
"bytes" "bytes"
"context" "context"
"errors"
"fmt" "fmt"
"io" "io"
"net" "net"
@ -243,7 +244,7 @@ func vbox(ctx context.Context, path string) error {
} }
defer cleanup(vboxmanage, name) defer cleanup(vboxmanage, name)
if err := term.Resize(ws); err != nil { if err := term.Resize(ws); err != nil && !errors.Is(err, console.ErrUnsupported) {
return fmt.Errorf("resize term: %v", err) return fmt.Errorf("resize term: %v", err)
} }
if err := term.SetRaw(); err != nil { if err := term.SetRaw(); err != nil {

2
go.mod
View File

@ -15,7 +15,7 @@ require (
github.com/spf13/cobra v1.4.0 github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
github.com/svenwiltink/sparsecat v1.0.0 github.com/svenwiltink/sparsecat v1.0.0
go.linka.cloud/console v0.0.0-20220909155039-4f33e50bb6ab go.linka.cloud/console v0.0.0-20220910100646-48f9f2b8843b
go.uber.org/multierr v1.8.0 go.uber.org/multierr v1.8.0
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
) )

4
go.sum
View File

@ -814,8 +814,8 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3C
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
go.linka.cloud/console v0.0.0-20220909155039-4f33e50bb6ab h1:v0ALU+2/9TNLmTXOodq5M6ZJXXpQ4jLxSHNVR4YG71Y= go.linka.cloud/console v0.0.0-20220910100646-48f9f2b8843b h1:LccDAOuhRuyJqirU7I34UEEoYvuWWJ2jbs2Hyuc2aYU=
go.linka.cloud/console v0.0.0-20220909155039-4f33e50bb6ab/go.mod h1:CDIUd0pM9zEd+8b0oYJO4GPi/r/ftrZkdL4AOJKNy3w= go.linka.cloud/console v0.0.0-20220910100646-48f9f2b8843b/go.mod h1:P/4MMfexPBBlmMpefLne7phPoNice1vhX65ZqOfzGII=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=