AntoinePrv commented on code in PR #50056: URL: https://github.com/apache/arrow/pull/50056#discussion_r3311764254
########## dev/archery/archery/utils/tmpdir.py: ########## @@ -15,13 +15,17 @@ # specific language governing permissions and limitations # under the License. +import os from contextlib import contextmanager from tempfile import mkdtemp, TemporaryDirectory @contextmanager -def tmpdir(preserve=False, prefix="arrow-archery-"): - if preserve: +def tmpdir(preserve=False, prefix="arrow-archery-", preserve_dir=None): + if preserve and preserve_dir is not None: + os.makedirs(preserve_dir, exist_ok=True) + yield preserve_dir Review Comment: Working as intended. We want to have the same preserve dir to store multiple runs inside. The argument could be made for Path input but it not as clear why users would want to use such a option with the same path again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
