@@ -133,19 +133,15 @@ def run_reachability_analysis(
133133 cli_package = self ._ensure_coana_cli_installed (version )
134134
135135 # Build CLI command arguments
136- cmd = ["npx" , cli_package , "run" , target_directory ]
136+ cmd = ["npx" , cli_package , "run" , "." ]
137137
138138 # Add required arguments
139- # If output_path is relative, it should be relative to target_directory
140- if not os .path .isabs (output_path ):
141- full_output_path = os .path .join (target_directory , output_path )
142- else :
143- full_output_path = output_path
144-
145- output_dir = str (pathlib .Path (full_output_path ).parent )
139+ output_dir = str (pathlib .Path (output_path ).parent )
140+ log .warning (f"output_dir: { output_dir } " )
141+ log .warning (f"output_path: { output_path } " )
146142 cmd .extend ([
147143 "--output-dir" , output_dir ,
148- "--socket-mode" , full_output_path ,
144+ "--socket-mode" , output_path ,
149145 "--disable-report-submission"
150146 ])
151147
@@ -227,15 +223,15 @@ def run_reachability_analysis(
227223 raise Exception (f"Reachability analysis failed with exit code { result .returncode } " )
228224
229225 # Extract scan ID from output file
230- scan_id = self ._extract_scan_id (full_output_path )
226+ scan_id = self ._extract_scan_id (output_path )
231227
232228 log .info (f"Reachability analysis completed successfully" )
233229 if scan_id :
234230 log .info (f"Scan ID: { scan_id } " )
235231
236232 return {
237233 "scan_id" : scan_id ,
238- "report_path" : full_output_path ,
234+ "report_path" : output_path ,
239235 "tar_hash_used" : tar_hash
240236 }
241237
0 commit comments