cmd/ethkey: support --passwordfile in generate command (#21183)
This commit is contained in:
		@@ -52,7 +52,7 @@ func promptPassphrase(confirmation bool) string {
 | 
			
		||||
// getPassphrase obtains a passphrase given by the user.  It first checks the
 | 
			
		||||
// --passfile command line flag and ultimately prompts the user for a
 | 
			
		||||
// passphrase.
 | 
			
		||||
func getPassphrase(ctx *cli.Context) string {
 | 
			
		||||
func getPassphrase(ctx *cli.Context, confirmation bool) string {
 | 
			
		||||
	// Look for the --passwordfile flag.
 | 
			
		||||
	passphraseFile := ctx.String(passphraseFlag.Name)
 | 
			
		||||
	if passphraseFile != "" {
 | 
			
		||||
@@ -65,7 +65,7 @@ func getPassphrase(ctx *cli.Context) string {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Otherwise prompt the user for the passphrase.
 | 
			
		||||
	return promptPassphrase(false)
 | 
			
		||||
	return promptPassphrase(confirmation)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// signHash is a helper function that calculates a hash for the given message
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user