mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Adding AIX
Change-Id: Ibf023a1f6b635872c849bda885b47ea1dbf7dda3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2410733 Reviewed-by: Dirk Pranke <dpranke@google.com> Commit-Queue: Dirk Pranke <dpranke@google.com>
This commit is contained in:
@@ -589,7 +589,7 @@ def CheckCallAndFilter(args, print_stdout=False, filter_fn=None,
|
||||
# If our stdout is a terminal, then pass in a psuedo-tty pipe to our
|
||||
# subprocess when filtering its output. This makes the subproc believe
|
||||
# it was launched from a terminal, which will preserve ANSI color codes.
|
||||
if sys.stdout.isatty() and GetMacWinOrLinux() != 'win':
|
||||
if sys.stdout.isatty() and GetMacWinAixOrLinux() != 'win':
|
||||
pipe_reader, pipe_writer = os.openpty()
|
||||
else:
|
||||
pipe_reader, pipe_writer = os.pipe()
|
||||
@@ -737,7 +737,7 @@ def FindFileUpwards(filename, path=None):
|
||||
path = new_path
|
||||
|
||||
|
||||
def GetMacWinOrLinux():
|
||||
def GetMacWinAixOrLinux():
|
||||
"""Returns 'mac', 'win', or 'linux', matching the current platform."""
|
||||
if sys.platform.startswith(('cygwin', 'win')):
|
||||
return 'win'
|
||||
@@ -745,6 +745,8 @@ def GetMacWinOrLinux():
|
||||
return 'linux'
|
||||
elif sys.platform == 'darwin':
|
||||
return 'mac'
|
||||
elif sys.platform.startswith('aix'):
|
||||
return 'aix'
|
||||
raise Error('Unknown platform: ' + sys.platform)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user