Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command
localConfig, err := config.ReadLocalConfig(globalClientOpts.ConfigPath)
if err != nil {
fmt.Println(err)
return
os.Exit(1)
}

// Prepare Microcks client.
Expand Down Expand Up @@ -101,7 +101,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command
// Create client from config file and using the current or provided context.
if localConfig == nil {
fmt.Println("Please login to perform operation...")
return
os.Exit(1)
}

if globalClientOpts.Context == "" {
Expand All @@ -111,7 +111,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command
mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
return
os.Exit(1)
}
}

Expand Down
8 changes: 4 additions & 4 deletions cmd/importDir.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ func NewImportDirCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
localConfig, err := config.ReadLocalConfig(globalClientOpts.ConfigPath)
if err != nil {
fmt.Println(err)
return
os.Exit(1)
}

if localConfig == nil {
fmt.Println("Please login to perform operation...")
return
os.Exit(1)
}

if globalClientOpts.Context == "" {
Expand All @@ -147,7 +147,7 @@ func NewImportDirCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
mc, err := connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
return
os.Exit(1)
}

// Set up business logic dependencies
Expand All @@ -163,7 +163,7 @@ func NewImportDirCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
if err != nil {
if validationErr, ok := err.(*ValidationError); ok {
fmt.Println(validationErr.Message)
return
os.Exit(1)
}
fmt.Printf("Error: %v\n", err)
os.Exit(1)
Expand Down
6 changes: 3 additions & 3 deletions cmd/importURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
localConfig, err := config.ReadLocalConfig(globalClientOpts.ConfigPath)
if err != nil {
fmt.Println(err)
return
os.Exit(1)
}

if localConfig == nil {
fmt.Println("Please login to perform operation...")
return
os.Exit(1)
}

if globalClientOpts.Context == "" {
Expand All @@ -92,7 +92,7 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
return
os.Exit(1)
}
}
sepSpecificationFiles := strings.Split(specificationFiles, ",")
Expand Down
6 changes: 3 additions & 3 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {
localConfig, err := config.ReadLocalConfig(globalClientOpts.ConfigPath)
if err != nil {
fmt.Println(err)
return
os.Exit(1)
}

if localConfig == nil {
fmt.Println("Please login to perform operation...")
return
os.Exit(1)
}

if globalClientOpts.Context == "" {
Expand All @@ -160,7 +160,7 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {
mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
return
os.Exit(1)
}

ctx, err := localConfig.ResolveContext(globalClientOpts.Context)
Expand Down
Loading