Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
make hosts command run
Browse files Browse the repository at this point in the history
Signed-off-by: Jason McCallister <jason@craftcms.com>
  • Loading branch information
jasonmccallister committed Apr 8, 2020
1 parent 445e77c commit 4170422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions internal/cmd/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"errors"
"fmt"
"os"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -49,8 +48,6 @@ var hostsCommand = &cobra.Command{

hosts.AddHosts(ip, domains)

fmt.Println(hosts.RenderHostsFile())

return nil
return hosts.Save()
},
}
6 changes: 2 additions & 4 deletions internal/cmd/hosts_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ var hostsRemoveCommand = &cobra.Command{
domains = append(domains, site.Domain)
}

hosts.RemoveAddresses(domains)
hosts.Remove(domains)

// fmt.Println(hosts.RenderHostsFile())

return nil
return hosts.Save()
},
}

0 comments on commit 4170422

Please # to comment.