Skip to content

Enhance profile selection logic in oci_auth_refresher.sh to priorit…#3

Merged
rozdolsky33 merged 1 commit intomainfrom
fix/prifile-select-priority
Aug 5, 2025
Merged

Enhance profile selection logic in oci_auth_refresher.sh to priorit…#3
rozdolsky33 merged 1 commit intomainfrom
fix/prifile-select-priority

Conversation

@rozdolsky33
Copy link
Contributor

Fix: Correct OCI profile selection logic

Description

This pull request addresses a bug in the oci_auth_refresher.sh script where the OCI profile was not being selected in the correct order of precedence. The script did not prioritize the profile name passed as a command-line argument over the OCI_CLI_PROFILE environment variable, leading to incorrect profile usage when both were present.

The Fix

The profile selection logic has been updated to ensure the correct priority:

  1. A profile name passed as a direct command-line argument.
  2. The $OCI_CLI_PROFILE environment variable.
  3. The "DEFAULT" profile as a final fallback.

The script version has also been bumped to v0.1.2 to reflect this fix.

…ize CLI argument, environment variable, and fallback to default. Update version to v0.1.2.
@rozdolsky33 rozdolsky33 requested a review from dnlloyd August 4, 2025 14:19
@rozdolsky33 rozdolsky33 self-assigned this Aug 4, 2025
@rozdolsky33 rozdolsky33 merged commit 795f6eb into main Aug 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants