Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Port Conflict Error #1033

Merged
merged 6 commits into from May 14, 2021
Merged

Fix Port Conflict Error #1033

merged 6 commits into from May 14, 2021

Conversation

arknable
Copy link
Contributor

Fixed port conflict error message to be human-readable

To find out whether they are being used by other applications.
Also check message option flags and assign them to config
@arknable arknable self-assigned this May 14, 2021
@arknable arknable marked this pull request as ready for review May 14, 2021 13:19
@arknable arknable linked an issue May 14, 2021 that may be closed by this pull request
cmd/cmd_root.go Outdated
@@ -31,6 +31,27 @@ func GetRootCommand() *cobra.Command {
}
}

showErrors, err := cmd.Flags().GetBool("show-errors")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this being handled by globalFlags.MergeToConfig(config)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabioDMFerreira oh you right ... I will move that line outside the if block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by 70a813b

cmd/cmd_pkg.go Outdated
@@ -246,3 +245,14 @@ func loadCommandHandler(cmd *cobra.Command, args []string) {
exitWithError(err.Error())
}
}

func excludeWhitespaces(arr []string) []string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to move to another file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabioDMFerreira how about moved to separated util package ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by ca51410

@fabioDMFerreira fabioDMFerreira merged commit d960f42 into master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide human friendly error msg for local port forwarding errors
2 participants