Skip to content

Commit

Permalink
fix sample-dcrd.conf and promptsecret warnings (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolan authored Aug 17, 2017
1 parent 59d047c commit 05dcad6
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions cmd/dcrinstall/dcrinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,33 @@ type ctx struct {
}

type binary struct {
Name string // binary filename
Config string // actual config file
Example string // example config file
Name string // binary filename
Config string // actual config file
Example string // example config file
SupportsVersion bool // whether or not it supports --version
}

var (
binaries = []binary{
{
Name: "dcrctl",
Config: "dcrctl.conf",
Example: "sample-dcrctl.conf",
Name: "dcrctl",
Config: "dcrctl.conf",
Example: "sample-dcrctl.conf",
SupportsVersion: true,
},
{
Name: "dcrd",
Config: "dcrd.conf",
Example: "sample-dcrd.conf",
Name: "dcrd",
SupportsVersion: true,
},
{
Name: "dcrwallet",
Config: "dcrwallet.conf",
Example: "sample-dcrwallet.conf",
Name: "dcrwallet",
Config: "dcrwallet.conf",
Example: "sample-dcrwallet.conf",
SupportsVersion: true,
},
{
Name: "promptsecret",
Name: "promptsecret",
SupportsVersion: false,
},
}
)
Expand Down Expand Up @@ -327,6 +330,10 @@ func (c *ctx) running(name string) (bool, error) {
// the log file.
func (c *ctx) recordCurrent() error {
for _, v := range binaries {
if !v.SupportsVersion {
continue
}

// not in love with this, pull this out of tar instead
filename := filepath.Join(c.s.Destination, v.Name)

Expand Down

0 comments on commit 05dcad6

Please sign in to comment.