Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, conf *Co
cmd.Run()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check error result:

err = cmd.Run()
if err != nil {
    panic(err)
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's maybe a expect error ignore,because with the err check with the cmd.Run() will throw some note releated error stack.

--- FAIL: TestExample (0.00s)
    ???:1: 1 is not equal to 2
FAIL
panic: exit status 1

goroutine 1 [running]:
github.com/goplus/llgo/internal/build.linkMainPkg(0x1400af224b0, 0x1400009dba0, {0x1400bf28008, 0x70, 0x102c05020?}, 0x140001f4360, 0x3, 0x0)
        /Users/zhangzhiyang/Documents/Code/goplus/llgo/internal/build/build.go:515 +0x8d4
github.com/goplus/llgo/internal/build.Do({0x102ff8820, 0x0, 0x0}, 0x140001f4360)
        /Users/zhangzhiyang/Documents/Code/goplus/llgo/internal/build/build.go:271 +0xee4
github.com/goplus/llgo/cmd/internal/test.runCmd(0x22?, {0x102ff8820?, 0x14000076ae8?, 0x1027ba4d4?})
        /Users/zhangzhiyang/Documents/Code/goplus/llgo/cmd/internal/test/test.go:34 +0x8c
main.(*Cmd_test).Main.func1({0x102ff8820?, 0x1027ba4c4?, 0x14000206a00?})
        cmd/llgo/test_cmd.gox:27 +0x40
main.(*Cmd_test).Main.(*Command).Run__1.func2(0x14000206a00?, {0x102ff8820?, 0x4?, 0x102a91864?})
        /Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/xcmd/classfile.go:87 +0x34
github.com/goplus/cobra.(*Command).execute(0x1400021b508, {0x102ff8820, 0x0, 0x0})
        /Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1019 +0x810
github.com/goplus/cobra.(*Command).ExecuteC(0x1400021a008)
        /Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1148 +0x350
github.com/goplus/cobra.(*Command).Execute(...)
        /Users/zhangzhiyang/go/pkg/mod/github.com/goplus/cobra@v1.9.12/command.go:1071

if s := cmd.ProcessState; s != nil {
fmt.Fprintf(os.Stderr, "%s: exit code %d\n", app, s.ExitCode())
mockable.Exit(s.ExitCode())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't call s.ExitCode() twice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #1129

}
case ModeRun:
args := make([]string, 0, len(conf.RunArgs)+1)
Expand Down
Loading