remove source-path cli argument
Browse files
src/know_lang_bot/__main__.py
CHANGED
@@ -23,13 +23,6 @@ def parse_args():
|
|
23 |
formatter_class=argparse.RawDescriptionHelpFormatter
|
24 |
)
|
25 |
|
26 |
-
parser.add_argument(
|
27 |
-
"--source_path",
|
28 |
-
type=str,
|
29 |
-
default=".",
|
30 |
-
help="Path to the source code (git repository or directory)"
|
31 |
-
)
|
32 |
-
|
33 |
parser.add_argument(
|
34 |
"--config",
|
35 |
type=str,
|
@@ -96,13 +89,12 @@ async def main():
|
|
96 |
try:
|
97 |
# Load configuration
|
98 |
config = create_config(args.config)
|
99 |
-
source_path = Path(args.source_path)
|
100 |
-
|
101 |
# Create parser factory
|
102 |
factory = CodeParserFactory(config)
|
103 |
|
104 |
# Determine provider
|
105 |
-
|
|
|
106 |
LOG.info(f"Detected Git repository at {source_path}")
|
107 |
provider = GitProvider(source_path, config)
|
108 |
else:
|
|
|
23 |
formatter_class=argparse.RawDescriptionHelpFormatter
|
24 |
)
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
parser.add_argument(
|
27 |
"--config",
|
28 |
type=str,
|
|
|
89 |
try:
|
90 |
# Load configuration
|
91 |
config = create_config(args.config)
|
|
|
|
|
92 |
# Create parser factory
|
93 |
factory = CodeParserFactory(config)
|
94 |
|
95 |
# Determine provider
|
96 |
+
source_path = Path(config.db.codebase_directory)
|
97 |
+
if (source_path/ '.git').exists():
|
98 |
LOG.info(f"Detected Git repository at {source_path}")
|
99 |
provider = GitProvider(source_path, config)
|
100 |
else:
|