Skip to content

Commit e11f76b

Browse files
authored
Merge pull request #1870 from pratikjagrut/completion.issue
fix: completion test log issue
2 parents 07bad91 + 55685aa commit e11f76b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cmd/run.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,22 @@ func (cmd *RunCmd) RunRun(f factory.Factory, args []string) error {
201201
}
202202

203203
func getCommands(f factory.Factory, logger log.Logger) ([]*latest.CommandConfig, error) {
204+
// get current working dir
205+
cwd, err := os.Getwd()
206+
if err != nil {
207+
return nil, err
208+
}
209+
210+
// set working dir back to original
211+
defer func() { _ = os.Chdir(cwd) }()
212+
204213
// Set config root
205214
configLoader := f.NewConfigLoader("")
206-
configExists, err := configLoader.SetDevSpaceRoot(logger)
215+
configExists, err := configLoader.SetDevSpaceRoot(log.Discard)
207216
if err != nil {
208217
return nil, err
209218
}
219+
210220
if !configExists {
211221
return nil, errors.New(message.ConfigNotFound)
212222
}

0 commit comments

Comments
 (0)