mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
[sg] legacy commands continue watching after compilation failures (#61274)
Allow legacy commands to fail compilation and continue watching
This commit is contained in:
parent
27ba9a7671
commit
c2db9d077d
@ -106,6 +106,12 @@ func (runner *cmdRunner) run(ctx context.Context) error {
|
||||
shouldRestart, err := runner.reinstall(ctx, cmd)
|
||||
if err != nil {
|
||||
runner.printError(cmd, err)
|
||||
|
||||
// If the error came from the install step then we continue watching
|
||||
// and will retry building if there is another source change.
|
||||
if _, ok := err.(installErr); ok {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@ -164,7 +170,6 @@ func (runner *cmdRunner) reinstall(ctx context.Context, cmd SGConfigCommand) (bo
|
||||
}
|
||||
|
||||
if err := installer.RunInstall(ctx, runner.parentEnv); err != nil {
|
||||
runner.printError(cmd, err)
|
||||
return false, err
|
||||
}
|
||||
newHash, err := md5HashFile(bin)
|
||||
|
||||
@ -287,6 +287,7 @@ commands:
|
||||
export GCFLAGS='all=-N -l'
|
||||
fi
|
||||
go build -gcflags="$GCFLAGS" -o .bin/worker github.com/sourcegraph/sourcegraph/cmd/worker
|
||||
checkBinary: .bin/worker
|
||||
watch:
|
||||
- lib
|
||||
- internal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user