rename --value to --raw-value + polish docs

This commit is contained in:
Maidul Islam
2024-03-08 10:53:11 -05:00
parent 8e25631fb0
commit 99fe43f459
2 changed files with 11 additions and 13 deletions

View File

@@ -406,7 +406,7 @@ func getSecretsByNames(cmd *cobra.Command, args []string) {
util.HandleError(err, "Unable to parse path flag")
}
showOnlyValue, err := cmd.Flags().GetBool("value")
showOnlyValue, err := cmd.Flags().GetBool("raw-value")
if err != nil {
util.HandleError(err, "Unable to parse path flag")
}
@@ -433,7 +433,7 @@ func getSecretsByNames(cmd *cobra.Command, args []string) {
}
if showOnlyValue && len(requestedSecrets) > 1 {
util.PrintErrorMessageAndExit("--value only works with one secret.")
util.PrintErrorMessageAndExit("--raw-value only works with one secret.")
}
if showOnlyValue {
@@ -674,7 +674,7 @@ func init() {
secretsGetCmd.Flags().String("token", "", "Fetch secrets using the Infisical Token")
secretsCmd.AddCommand(secretsGetCmd)
secretsGetCmd.Flags().String("path", "/", "get secrets within a folder path")
secretsGetCmd.Flags().Bool("value", false, "Returns only the value of secret, only works with one secret")
secretsGetCmd.Flags().Bool("raw-value", false, "Returns only the value of secret, only works with one secret")
secretsCmd.Flags().Bool("secret-overriding", true, "Prioritizes personal secrets, if any, with the same name over shared secrets")
secretsCmd.AddCommand(secretsSetCmd)

View File

@@ -12,13 +12,12 @@ infisical secrets
This command enables you to perform CRUD (create, read, update, delete) operations on secrets within your Infisical project. With it, you can view, create, update, and delete secrets in your environment.
### Sub-commands
<Accordion title="infisical secrets" defaultOpen="true">
Use this command to print out all of the secrets in your project
```bash
$ infisical secrets
```
```bash
$ infisical secrets
```
### Environment variables
@@ -91,17 +90,16 @@ $ infisical secrets get DOMAIN
</Accordion>
<Accordion title="--value">
Used to get just the value of that secret. But this only works with one secret.
<Accordion title="--raw-value">
Used to print the plain value of a single requested secret without any table style.
Default value: `false`
Example: `infisical secrets get DOMAIN --value`
```sh
# Suggested: When running in CI/CD Environments, or in a script, set INFISICAL_DISABLE_UPDATE_CHECK env to true, to hide cli update messages.
INFISICAL_DISABLE_UPDATE_CHECK=true infisical secrets get DOMAIN --value
```
<Tip>
When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK` env to `true`. This will help hide any CLI update messages and only show the secret value.
</Tip>
</Accordion>
</Accordion>