File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,24 @@ def msys_to_windows_path(msys_path):
4343 print (f"Error converting path: { e } " )
4444 return None
4545
46- def should_convert (var_name : str ,
46+ def should_convert (var : str ,
47+ convert : list [str ] | None ,
4748 exclude : list [str ] | None ):
4849 """Check the variable name against exclude list"""
49- if exclude and var_name in exclude :
50+ if exclude and var in exclude :
5051 return False
52+
53+ if var in convert :
54+ return True
55+
56+ return False
5157
5258def main (parsed_args : argparse .Namespace ):
5359 converted_paths = {}
5460
55- for var_value in parsed_args .convert :
56- var , value = var_value .split ("=" )
61+ for var , value in os .environ .items ():
5762 if not value or not should_convert (var ,
63+ parsed_args .convert ,
5864 parsed_args .exclude ):
5965 continue
6066 converted_path = msys_to_windows_path (value )
You can’t perform that action at this time.
0 commit comments