wmllint: activate wildcard globbing on Windows
The Windows cmd shell does not expand wildcards by default, unlike UNIX shells. This imports glob.glob and runs arguments through it on Windows. This will be frontported once I'm done on this branch and ready to check out master again.
This commit is contained in:
parent
5962eef8ea
commit
7bee47a956
1 changed files with 9 additions and 0 deletions
|
@ -2151,6 +2151,15 @@ if __name__ == '__main__':
|
|||
if arg.endswith('"'):
|
||||
arguments[i] = arg[:-1]
|
||||
|
||||
# Also, Windows does not expand wildcards. This turns on globbing.
|
||||
if sys.platform == 'win32':
|
||||
from glob import glob
|
||||
for arg in arguments:
|
||||
wildarg = glob(arg)
|
||||
arguments.remove(arg)
|
||||
for newarg in wildarg:
|
||||
arguments.append(newarg)
|
||||
|
||||
for dir in arguments:
|
||||
ofp = None
|
||||
if "older" in versions:
|
||||
|
|
Loading…
Add table
Reference in a new issue