Skip to content

Commit

Permalink
Merge pull request #14 from AllenNeuralDynamics/fix-robocopy-no-copy
Browse files Browse the repository at this point in the history
Fix unwanted robocopy behavior where no files were copied
  • Loading branch information
bruno-f-cruz authored Nov 12, 2024
2 parents b3100b1 + 498fcd9 commit ebfe4e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/aind_behavior_experiment_launcher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.1"
__version__ = "0.2.2"

import logging
import logging.config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import shutil
import subprocess
from os import PathLike
from os import PathLike, makedirs
from pathlib import Path
from typing import Dict, Optional

Expand All @@ -21,7 +21,7 @@ def __init__(
extra_args: Optional[str] = None,
delete_src: bool = False,
overwrite: bool = False,
force_dir: bool = True,
force_dir: bool = True
):
self.source = source
self.destination = destination
Expand Down Expand Up @@ -52,9 +52,9 @@ def transfer(
if self.overwrite:
command.append("/IS")
if self.force_dir:
command.append("/CREATE")
makedirs(dst, exist_ok=True)
cmd = " ".join(command)
logger.info("Running Robocopy command: %s", " ".join(command))
logger.info("Running Robocopy command: %s", cmd)
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) as process:
if process.stdout:
for line in process.stdout:
Expand Down

0 comments on commit ebfe4e3

Please sign in to comment.