Fix xb lint --all on Windows.
This commit is contained in:
parent
ad0c781c37
commit
39765093d6
|
@ -185,7 +185,7 @@ def get_bin(binary):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def shell_call(command, throw_on_error=True, stdout_path=None):
|
def shell_call(command, throw_on_error=True, stdout_path=None, shell=False):
|
||||||
"""Executes a shell command.
|
"""Executes a shell command.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -203,10 +203,10 @@ def shell_call(command, throw_on_error=True, stdout_path=None):
|
||||||
try:
|
try:
|
||||||
if throw_on_error:
|
if throw_on_error:
|
||||||
result = 1
|
result = 1
|
||||||
subprocess.check_call(command, shell=False, stdout=stdout_file)
|
subprocess.check_call(command, shell=shell, stdout=stdout_file)
|
||||||
result = 0
|
result = 0
|
||||||
else:
|
else:
|
||||||
result = subprocess.call(command, shell=False, stdout=stdout_file)
|
result = subprocess.call(command, shell=shell, stdout=stdout_file)
|
||||||
finally:
|
finally:
|
||||||
if stdout_file:
|
if stdout_file:
|
||||||
stdout_file.close()
|
stdout_file.close()
|
||||||
|
@ -1234,7 +1234,7 @@ class LintCommand(Command):
|
||||||
shell_call([
|
shell_call([
|
||||||
'type' if sys.platform == 'win32' else 'cat',
|
'type' if sys.platform == 'win32' else 'cat',
|
||||||
difftemp,
|
difftemp,
|
||||||
])
|
], shell=True if sys.platform == 'win32' else False)
|
||||||
if os.path.exists(difftemp): os.remove(difftemp)
|
if os.path.exists(difftemp): os.remove(difftemp)
|
||||||
print('')
|
print('')
|
||||||
print('')
|
print('')
|
||||||
|
|
Loading…
Reference in New Issue