mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	vault operator init -output-curl-string bug (#17514)
* fixing -output-curl-string bug * add changelog * fix for -output-policy * adding comment for -output-policy
This commit is contained in:
		| @@ -237,6 +237,15 @@ func (c *OperatorInitCommand) Run(args []string) int { | ||||
| 		return 2 | ||||
| 	} | ||||
|  | ||||
| 	// -output-curl string returns curl command for seal status | ||||
| 	// setting this to false and then setting actual value after reading seal status | ||||
| 	currentOutputCurlString := client.OutputCurlString() | ||||
| 	client.SetOutputCurlString(false) | ||||
| 	// -output-policy string returns minimum required policy HCL for seal status | ||||
| 	// setting this to false and then setting actual value after reading seal status | ||||
| 	outputPolicy := client.OutputPolicy() | ||||
| 	client.SetOutputPolicy(false) | ||||
|  | ||||
| 	// Set defaults based on use of auto unseal seal | ||||
| 	sealInfo, err := client.Sys().SealStatus() | ||||
| 	if err != nil { | ||||
| @@ -244,6 +253,9 @@ func (c *OperatorInitCommand) Run(args []string) int { | ||||
| 		return 2 | ||||
| 	} | ||||
|  | ||||
| 	client.SetOutputCurlString(currentOutputCurlString) | ||||
| 	client.SetOutputPolicy(outputPolicy) | ||||
|  | ||||
| 	switch sealInfo.RecoverySeal { | ||||
| 	case true: | ||||
| 		if c.flagRecoveryShares == 0 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 akshya96
					akshya96