File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 88func (database * Database ) ApplyDefaults (server * Server ) {
99 // set default connection if not set
1010 if database .Connection == nil {
11- * database .Connection = * server .Connection
11+ database .Connection = server .Connection . Clone ()
1212 }
1313}
1414
Original file line number Diff line number Diff line change 88func (filesystem * Filesystem ) ApplyDefaults (server * Server ) {
99 // set default connection if not set
1010 if filesystem .Connection == nil {
11- * filesystem .Connection = * server .Connection
11+ filesystem .Connection = server .Connection . Clone ()
1212 }
1313
1414 // set default path
Original file line number Diff line number Diff line change 77 "strings"
88 "github.com/webdevops/go-shell"
99 "fmt"
10+ "runtime/debug"
1011)
1112
1213func CreateTempfile () * os.File {
@@ -81,5 +82,9 @@ func ShellErrorHandler(recover interface{}) {
8182
8283 os .Exit (2 )
8384 }
85+ } else {
86+ fmt .Print ("ERROR:" )
87+ fmt .Println (recover )
88+ debug .PrintStack ()
8489 }
8590}
Original file line number Diff line number Diff line change 11package sync
22
33import (
4+ "github.com/mohae/deepcopy"
45 "github.com/webdevops/go-shell/commandbuilder"
56)
67
@@ -54,3 +55,10 @@ func (yconn *YamlCommandBuilderConnection) IsEmpty() (status bool) {
5455
5556 return true
5657}
58+
59+ // Clone yaml connection (without shell connection instance)
60+ func (yconn * YamlCommandBuilderConnection ) Clone () (conn * YamlCommandBuilderConnection ) {
61+ conn = deepcopy .Copy (yconn ).(* YamlCommandBuilderConnection )
62+ conn .connection = nil
63+ return conn
64+ }
You can’t perform that action at this time.
0 commit comments