fixed bug with dev env vars
This commit is contained in:
+1
-3
@@ -14,7 +14,7 @@ load_dotenv('dev.env')
|
|||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read(Path(__file__).parent / 'defaults.ini')
|
config.read(Path(__file__).parent / 'defaults.ini')
|
||||||
REPO_DIR = config.get('main', 'repo_dir')
|
REPO_DIR = config.get('main', 'repo_dir')
|
||||||
if 'DEV' in os.environ:
|
if 'ENV' in os.environ and os.getenv('ENV') == 'DEV':
|
||||||
REPO_DIR = os.getenv('REPO_DIR', default=REPO_DIR)
|
REPO_DIR = os.getenv('REPO_DIR', default=REPO_DIR)
|
||||||
|
|
||||||
|
|
||||||
@@ -22,8 +22,6 @@ def clone_repository(
|
|||||||
repo_url: AnyHttpUrl,
|
repo_url: AnyHttpUrl,
|
||||||
repo_dir: str = REPO_DIR
|
repo_dir: str = REPO_DIR
|
||||||
) -> Path:
|
) -> Path:
|
||||||
print('repo_url: ', repo_url)
|
|
||||||
print('repo_dir: ', repo_dir)
|
|
||||||
# extract repo name
|
# extract repo name
|
||||||
repo_name = repo_url.split('/')[-1].replace('.git', '')
|
repo_name = repo_url.split('/')[-1].replace('.git', '')
|
||||||
dst_dir = Path(repo_dir) / repo_name
|
dst_dir = Path(repo_dir) / repo_name
|
||||||
|
|||||||
Reference in New Issue
Block a user