Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alibabacloud_credentials/provider/cli_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CLIProfileCredentialsProvider(ICredentialsProvider):

def __init__(self, *,
profile_name: str = None):
self._profile_file = os.path.join(ac.HOME, "/.aliyun/config.json")
self._profile_file = os.path.join(ac.HOME, ".aliyun/config.json")
self._profile_name = profile_name or au.environment_profile_name
self.__innerProvider = None

Expand Down
2 changes: 1 addition & 1 deletion alibabacloud_credentials/provider/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _load_ini(file_path: str) -> Dict[str, Dict[str, str]]:


def _get_default_file() -> str:
return os.path.join(ac.HOME, "/.alibabacloud/credentials.ini")
return os.path.join(ac.HOME, ".alibabacloud/credentials.ini")


class ProfileCredentialsProvider(ICredentialsProvider):
Expand Down
4 changes: 2 additions & 2 deletions tests/provider/test_cli_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestCLIProfileCredentialsProvider(unittest.TestCase):

def setUp(self):
self.profile_name = "test_profile"
self.profile_file = os.path.join(ac.HOME, "/.aliyun/config.json")
self.profile_file = os.path.join(ac.HOME, ".aliyun/config.json")
self.config = {
"current": "test_profile",
"profiles": [
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_init_valid_input(self):
provider = CLIProfileCredentialsProvider()

self.assertEqual(provider._profile_name, self.profile_name)
self.assertEqual(provider._profile_file, os.path.join(ac.HOME, "/.aliyun/config.json"))
self.assertEqual(provider._profile_file, os.path.join(ac.HOME, ".aliyun/config.json"))

def test_get_credentials_valid_ak(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/provider/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TestProfileCredentialsProvider(unittest.TestCase):

def setUp(self):
self.profile_name = "default"
self.profile_file = os.path.join(ac.HOME, "/.alibabacloud/credentials.ini")
self.profile_file = os.path.join(ac.HOME, ".alibabacloud/credentials.ini")
self.config = {'default': {
'type': 'access_key',
'access_key_id': 'test_access_key_id',
Expand Down
Loading