solved file path bugs
This commit is contained in:
8
main.py
Normal file → Executable file
8
main.py
Normal file → Executable file
@@ -1,10 +1,14 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
# Ensure the current working directory is the script’s directory
|
||||||
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
# Define configuration file paths.
|
# Define configuration file paths.
|
||||||
USER_CONFIG_PATH = os.path.join("config", "config.yaml")
|
USER_CONFIG_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "config", "config.yaml")
|
||||||
BIN_DIR = os.path.expanduser("~/.local/bin")
|
BIN_DIR = os.path.expanduser("~/.local/bin")
|
||||||
|
|
||||||
from pkgmgr.clone_repos import clone_repos
|
from pkgmgr.clone_repos import clone_repos
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
DEFAULT_CONFIG_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../","config", "defaults.yaml")
|
||||||
DEFAULT_CONFIG_PATH = os.path.join("config", "defaults.yaml")
|
|
||||||
|
|
||||||
def load_config(user_config_path):
|
def load_config(user_config_path):
|
||||||
"""Load configuration from defaults and merge in user config if present."""
|
"""Load configuration from defaults and merge in user config if present."""
|
||||||
|
|||||||
Reference in New Issue
Block a user