@@ -206,16 +206,21 @@ def verify_policy(verify_policy_args: argparse.Namespace) -> int:
206206 vsa = generate_vsa (policy_content = policy_content , policy_result = result )
207207 if vsa is not None :
208208 vsa_filepath = os .path .join (global_config .output_path , "vsa.intoto.jsonl" )
209- logger .info ("Generating the Verification Summary Attestation (VSA) to %s." , vsa_filepath )
209+ logger .info (
210+ "Generating the Verification Summary Attestation (VSA) to %s." ,
211+ os .path .relpath (vsa_filepath , os .getcwd ()),
212+ )
210213 logger .info (
211214 "To decode and inspect the payload, run `cat %s | jq -r '.payload' | base64 -d | jq`." ,
212- vsa_filepath ,
215+ os . path . relpath ( vsa_filepath , os . getcwd ()) ,
213216 )
214217 try :
215218 with open (vsa_filepath , mode = "w" , encoding = "utf-8" ) as file :
216219 file .write (json .dumps (vsa ))
217220 except OSError as err :
218- logger .error ("Could not generate the VSA to %s. Error: %s" , vsa_filepath , err )
221+ logger .error (
222+ "Could not generate the VSA to %s. Error: %s" , os .path .relpath (vsa_filepath , os .getcwd ()), err
223+ )
219224
220225 policy_reporter = PolicyReporter ()
221226 policy_reporter .generate (global_config .output_path , result )
@@ -544,9 +549,9 @@ def main(argv: list[str] | None = None) -> None:
544549 sys .exit (os .EX_USAGE )
545550
546551 if os .path .isdir (args .output_dir ):
547- logger .info ("Setting the output directory to %s" , args .output_dir )
552+ logger .info ("Setting the output directory to %s" , os . path . relpath ( args .output_dir , os . getcwd ()) )
548553 else :
549- logger .info ("No directory at %s. Creating one ..." , args .output_dir )
554+ logger .info ("No directory at %s. Creating one ..." , os . path . relpath ( args .output_dir , os . getcwd ()) )
550555 os .makedirs (args .output_dir )
551556
552557 # Add file handler to the root logger. Remove stream handler from the
0 commit comments