diff --git a/utils/swift_build_support/swift_build_support/products/tensorflow.py b/utils/swift_build_support/swift_build_support/products/tensorflow.py index 7dc1ebe38646e..8e2d03ef36b13 100644 --- a/utils/swift_build_support/swift_build_support/products/tensorflow.py +++ b/utils/swift_build_support/swift_build_support/products/tensorflow.py @@ -216,6 +216,9 @@ def install(self, host_target): try: shutil.rmtree(os.path.join(self.install_toolchain_path(), 'usr', 'lib', 'swift', 'tensorflow')) + except OSError: + pass + try: os.makedirs(os.path.join(self.install_toolchain_path(), 'usr', 'lib', 'swift', 'tensorflow', 'c', 'eager'))