File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 66 "fmt"
77 "io"
88 "log/slog"
9+ "runtime"
910 "strings"
1011
1112 "github.com/distribution/reference"
@@ -17,6 +18,10 @@ import (
1718
1819func SplitCommandArray (cmd string ) []string {
1920 result := make ([]string , 0 )
21+ if runtime .GOOS == "windows" {
22+ // windows 中需要将路径再次转义一下,防止 parade 之后没有分隔符
23+ cmd = strings .ReplaceAll (cmd , "\\ " , "\\ \\ " )
24+ }
2025 result , err := shellwords .Parse (cmd )
2126 if err != nil {
2227 slog .Debug ("function split command array " , "error" , err )
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ func initRSA() error {
299299 _ = os .Remove (file )
300300 }
301301 _ , err := local .QuickRun (fmt .Sprintf (
302- `ssh-keygen -t rsa -b 4096 -f %s -N "" -C "%s@%s"` ,
302+ `ssh-keygen -t rsa -b 4096 -f "%s" -N "" -C "%s@%s"` ,
303303 filepath .Join (storage.Local {}.GetCertRsaPath (), define .DefaultIdKeyFile ),
304304 define .PanelAuthor ,
305305 define .PanelWebSite ,
You can’t perform that action at this time.
0 commit comments