File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,20 @@ def resolve_files(args):
4848 if args .expression :
4949 ptr = args .expression
5050 elif args .pointer_file :
51- with open (args .pointer_file ) as f :
52- content = f .read ().strip ()
53- # Handle JSON-encoded strings
54- if content .startswith ('"' ) and content .endswith ('"' ):
55- try :
56- ptr = json .loads (content )
57- except json .JSONDecodeError :
51+ try :
52+ with open (args .pointer_file ) as f :
53+ content = f .read ().strip ()
54+ # Handle JSON-encoded strings
55+ if content .startswith ('"' ) and content .endswith ('"' ):
56+ try :
57+ ptr = json .loads (content )
58+ except json .JSONDecodeError :
59+ ptr = content
60+ else :
5861 ptr = content
59- else :
60- ptr = content
62+ except FileNotFoundError :
63+ print (f"Error: Pointer file '{ args .pointer_file } ' not found" , file = sys .stderr )
64+ sys .exit (1 )
6165 else :
6266 sys .exit (1 ) # This should never happen because the group is required
6367
You can’t perform that action at this time.
0 commit comments