From d6cc4c20e907794b5acd46ede19af58f1acafa26 Mon Sep 17 00:00:00 2001 From: Nimish Date: Mon, 7 Oct 2024 10:38:20 +0530 Subject: [PATCH] feat: don't set the secret key to upper case by default --- phase_cli/cmd/secrets/create.py | 2 +- phase_cli/cmd/secrets/delete.py | 3 --- phase_cli/cmd/secrets/get.py | 2 +- phase_cli/cmd/secrets/update.py | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/phase_cli/cmd/secrets/create.py b/phase_cli/cmd/secrets/create.py index 7bfda3f2..d5939e36 100644 --- a/phase_cli/cmd/secrets/create.py +++ b/phase_cli/cmd/secrets/create.py @@ -28,7 +28,7 @@ def phase_secrets_create(key=None, env_name=None, phase_app=None, random_type=No key = input("🗝️\u200A Please enter the key: ") # Replace spaces in the key with underscores - key = key.replace(' ', '_').upper() + key = key.replace(' ', '_') # Generate a random value or get value from user, unless override is enabled if override: diff --git a/phase_cli/cmd/secrets/delete.py b/phase_cli/cmd/secrets/delete.py index f6d3d7c5..4330116f 100644 --- a/phase_cli/cmd/secrets/delete.py +++ b/phase_cli/cmd/secrets/delete.py @@ -22,9 +22,6 @@ def phase_secrets_delete(keys_to_delete: List[str] = None, env_name: str = None, keys_to_delete_input = input("Please enter the keys to delete (separate multiple keys with a space): ") keys_to_delete = keys_to_delete_input.split() - # Convert each key to uppercase - keys_to_delete = [key.upper() for key in keys_to_delete] - try: # Delete keys within the specified path and get the list of keys not found keys_not_found = phase.delete(env_name=env_name, keys_to_delete=keys_to_delete, app_name=phase_app, path=path) diff --git a/phase_cli/cmd/secrets/get.py b/phase_cli/cmd/secrets/get.py index 0e5ccee4..9f04e4c6 100644 --- a/phase_cli/cmd/secrets/get.py +++ b/phase_cli/cmd/secrets/get.py @@ -17,7 +17,7 @@ def phase_secrets_get(key, env_name=None, phase_app=None, tags=None, path='/'): console = Console() try: - key = key.upper() + secrets_data = phase.get(env_name=env_name, keys=[key], app_name=phase_app, tag=tags, path=path) # Find the specific secret for the given key within the provided path diff --git a/phase_cli/cmd/secrets/update.py b/phase_cli/cmd/secrets/update.py index 49688ce9..647bc55d 100644 --- a/phase_cli/cmd/secrets/update.py +++ b/phase_cli/cmd/secrets/update.py @@ -29,7 +29,7 @@ def phase_secrets_update(key, env_name=None, phase_app=None, random_type=None, r key = input("🗝️\u200A Please enter the key: ") # Replace spaces in the key with underscores - key = key.replace(' ', '_').upper() + key = key.replace(' ', '_') # Check if toggle_override is provided, if so, do not prompt for a new value if toggle_override: