Skip to content

Commit

Permalink
Remove ip flag from daemon command
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPologruto committed Jan 24, 2023
1 parent 1962996 commit dbbea21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/cli/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (

var (
tr = i18n.Tr
ip string
daemonize bool
debug bool
debugFile string
Expand All @@ -56,7 +55,6 @@ func NewCommand() *cobra.Command {
Args: cobra.NoArgs,
Run: runDaemonCommand,
}
daemonCommand.PersistentFlags().StringVar(&ip, "ip", "127.0.0.1", tr("The IP address the daemon will listen to"))
daemonCommand.PersistentFlags().String("port", "", tr("The TCP port the daemon will listen to"))
configuration.Settings.BindPFlag("daemon.port", daemonCommand.PersistentFlags().Lookup("port"))
daemonCommand.Flags().BoolVar(&daemonize, "daemonize", false, tr("Do not terminate daemon process if the parent process dies"))
Expand Down Expand Up @@ -120,6 +118,7 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
go feedback.ExitWhenParentProcessEnds()
}

ip := "127.0.0.1"
lis, err := net.Listen("tcp", fmt.Sprintf("%s:%s", ip, port))
if err != nil {
// Invalid port, such as "Foo"
Expand Down

0 comments on commit dbbea21

Please sign in to comment.