Skip to content

Commit bd943f4

Browse files
alexandre-dauboisdunglas
authored andcommitted
feat(extgen): print gen_stub.php in case of failure
1 parent 8f298ab commit bd943f4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/extgen/arginfo.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package extgen
22

33
import (
44
"fmt"
5+
"log"
56
"os"
67
"os/exec"
78
"path/filepath"
@@ -25,7 +26,9 @@ func (ag *arginfoGenerator) generate() error {
2526
stubFile := ag.generator.BaseName + ".stub.php"
2627
cmd := exec.Command("php", genStubPath, filepath.Join(ag.generator.BuildDir, stubFile))
2728

28-
if err := cmd.Run(); err != nil {
29+
output, err := cmd.CombinedOutput()
30+
if err != nil {
31+
log.Print("gen_stub.php output:\n", string(output))
2932
return fmt.Errorf("running gen_stub script: %w", err)
3033
}
3134

0 commit comments

Comments
 (0)