Skip to content

Commit 140173d

Browse files
committed
fix conversion script
1 parent 6328485 commit 140173d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ci/utilities/convert_msys_paths_to_win_paths.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ def should_convert(var_name: str,
4848
"""Check the variable name against exclude list"""
4949
if exclude and var_name in exclude:
5050
return False
51-
return True
5251

5352
def main(parsed_args: argparse.Namespace):
5453
converted_paths = {}
5554

56-
for var, value in os.environ.items():
55+
for var_value in parsed_args.convert:
56+
var, value = var_value.split("=")
5757
if not value or not should_convert(var,
5858
parsed_args.exclude):
5959
continue
@@ -73,7 +73,7 @@ def main(parsed_args: argparse.Namespace):
7373
parser.add_argument('--convert',
7474
nargs='+',
7575
required=True,
76-
help='List of variables to convert')
76+
help='Space separated list of variables and values to convert. E.g: --convert foo=/path/to/bar')
7777
parser.add_argument('--exclude',
7878
nargs='*',
7979
help='Optional list of variables to exclude')

0 commit comments

Comments
 (0)