Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin2li committed Jul 14, 2023
1 parent 191d8ee commit c50f5c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ jobs:
pip install -r requirements.txt
pyinstaller -F -w pdf.py
cp dist/pdf.exe ${ROOT}\build\bin\
cp ocr.py convert.py ${ROOT}\build\bin\
cp ocr.py ${ROOT}\build\bin\
cp convert.py ${ROOT}\build\bin\
cd $ROOT
choco install -y upx
Expand Down
4 changes: 3 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ func CheckCmdError(cmd *exec.Cmd) error {
}

func GetCmdStatusAndMessage(cmd *exec.Cmd) error {
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
if runtime.GOOS == "windows" {
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
}
out, err := cmd.Output()
if err != nil {
err = errors.Wrap(err, "get cmd output error! \n args: "+strings.Join(cmd.Args, " ")+"\n stderr: "+string(err.(*exec.ExitError).Stderr))
Expand Down

0 comments on commit c50f5c0

Please sign in to comment.