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):
48
48
if args .expression :
49
49
ptr = args .expression
50
50
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 :
58
61
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 )
61
65
else :
62
66
sys .exit (1 ) # This should never happen because the group is required
63
67
You can’t perform that action at this time.
0 commit comments