diff options
Diffstat (limited to 'cmd/fpkg/proc.go')
| -rw-r--r-- | cmd/fpkg/proc.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/fpkg/proc.go b/cmd/fpkg/proc.go index 311ae4f2..677ddb75 100644 --- a/cmd/fpkg/proc.go +++ b/cmd/fpkg/proc.go @@ -13,16 +13,16 @@ func mustRunApp(ctx context.Context, config *fst.Config, beforeFail func()) { rs := new(fst.RunState) a := app.MustNew(ctx, std) + var code int if sa, err := a.Seal(config); err != nil { fmsg.PrintBaseError(err, "cannot seal app:") - rs.ExitCode = 1 + code = 1 } else { - // this updates ExitCode - app.PrintRunStateErr(rs, sa.Run(rs)) + code = app.PrintRunStateErr(rs, sa.Run(rs)) } - if rs.ExitCode != 0 { + if code != 0 { beforeFail() - os.Exit(rs.ExitCode) + os.Exit(code) } } |
