Skip to content

Commit 530c130

Browse files
committed
Fix some potential test problems
1 parent 29e6c60 commit 530c130

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

pkg/devspace/sync/downstream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (d *downstream) startShell() error {
5252
} else {
5353
var err error
5454

55-
cmd := exec.Command("bash", "-c", "sh")
55+
cmd := exec.Command("sh")
5656

5757
d.stdinPipe, err = cmd.StdinPipe()
5858
if err != nil {

pkg/devspace/sync/sync_config.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ type SyncConfig struct {
5454
verbose bool
5555

5656
stopOnce sync.Once
57-
stopped bool
5857

5958
// Used for testing
6059
testing bool
@@ -96,7 +95,7 @@ func (s *SyncConfig) Error(err error) {
9695
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
9796
}
9897

99-
if s.stopped == false && s.errorChan != nil {
98+
if s.errorChan != nil {
10099
s.errorChan <- err
101100
}
102101
}
@@ -404,8 +403,6 @@ func (s *SyncConfig) sendChangesToUpstream(changes []*fileInformation) {
404403
// Stop stops the sync process
405404
func (s *SyncConfig) Stop() {
406405
s.stopOnce.Do(func() {
407-
s.stopped = true
408-
409406
if s.upstream != nil && s.upstream.interrupt != nil {
410407
close(s.upstream.interrupt)
411408

pkg/devspace/sync/upstream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (u *upstream) startShell() error {
5656
} else {
5757
var err error
5858

59-
cmd := exec.Command("bash", "-c", "sh")
59+
cmd := exec.Command("sh")
6060

6161
u.stdinPipe, err = cmd.StdinPipe()
6262
if err != nil {

0 commit comments

Comments
 (0)