Skip to content

Commit e6a8b46

Browse files
committed
Run currnt path if not input path
1 parent 25b3a44 commit e6a8b46

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fosslight_scanner/_get_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def ask_to_run(ask_msg):
2525
return return_value in return_true_item
2626

2727

28-
def get_input_mode(mode="all"):
28+
def get_input_mode(_executed_path, mode="all"):
2929
global _PYTHON_VERSION
3030
_PYTHON_VERSION = sys.version_info[0]
3131

@@ -38,7 +38,7 @@ def get_input_mode(mode="all"):
3838
2. Local source path\n"):
3939
url_to_analyze = get_input("Enter the link to analyze:", "")
4040
else:
41-
src_path = get_input("Please enter the path to analyze:", "")
41+
src_path = get_input("Please enter the path to analyze:", _executed_path)
4242

4343
if mode == "all" or mode == "dependency" or mode == "dep":
4444
dep_arguments = get_input(

src/fosslight_scanner/fosslight_scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def run_main(mode, path_arg, dep_arguments, output_file_or_dir, file_format, url
333333
run_prechecker = True
334334

335335
if src_path == "" and url_to_analyze == "":
336-
src_path, dep_arguments, url_to_analyze = get_input_mode(mode)
336+
src_path, dep_arguments, url_to_analyze = get_input_mode(_executed_path, mode)
337337

338338
if not hide_progressbar:
339339
timer = TimerThread()

0 commit comments

Comments
 (0)