Skip to content

Commit fc7387a

Browse files
committed
fix: let the homedir be expanded in path of helper
1 parent b5f43c8 commit fc7387a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitlab/config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import configparser
2020
import subprocess
2121
from typing import List, Optional, Union
22+
from os.path import expanduser
2223

2324
from gitlab.const import USER_AGENT
2425

@@ -205,6 +206,6 @@ def _get_values_from_helper(self):
205206
value = getattr(self, attr)
206207
_value_lower = value.lower().strip()
207208
if isinstance(value, str) and _value_lower.startswith(HELPER_PREFIX):
208-
helper = value[len(HELPER_PREFIX) :].strip()
209+
helper = expanduser(value[len(HELPER_PREFIX) :].strip())
209210
value = subprocess.check_output([helper]).decode("utf-8").strip()
210211
setattr(self, attr, value)

0 commit comments

Comments
 (0)