From e49be1da42ec659bbc2550ef2c18eb52c8a5e42d Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 19 Mar 2020 22:38:37 +0000 Subject: [PATCH] fix local runtime (#1383) --- runtime/default.go | 4 ++-- runtime/service.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/default.go b/runtime/default.go index d1eaba54..c9b381be 100644 --- a/runtime/default.go +++ b/runtime/default.go @@ -184,8 +184,8 @@ func (r *runtime) Create(s *Service, opts ...CreateOption) error { } if len(options.Command) == 0 { - options.Command = []string{"go", "run"} - options.Args = []string{"."} + options.Command = []string{"go"} + options.Args = []string{"run", "."} } // create new service diff --git a/runtime/service.go b/runtime/service.go index 8f1dd6ab..4b20ff65 100644 --- a/runtime/service.go +++ b/runtime/service.go @@ -72,7 +72,7 @@ func (s *service) shouldStart() bool { if s.running { return false } - return s.maxRetries <= s.retries + return s.retries <= s.maxRetries } func (s *service) ShouldStart() bool {