Skip to content

Commit

Permalink
hard coded shell executable to bash for source commands, because sour…
Browse files Browse the repository at this point in the history
…ce is not POSIX standard
  • Loading branch information
jsanjak committed Sep 8, 2023
1 parent ab19965 commit 8bfd534
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
10 changes: 0 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/cgr_gwas_qc/testing/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class CondaEnv:

conda_env_path = Path(__file__).absolute().parents[1] / "workflow/conda"

def __init__(self, cache_path: Optional[Union[str, Path]] = None):
Expand Down Expand Up @@ -128,4 +127,6 @@ def _create_conda_env(self, env_file: str, build_path: str) -> None:
build_path,
]
)
subprocess.run(cmd, shell=True, check=True, stderr=subprocess.STDOUT)
subprocess.run(
cmd, shell=True, check=True, stderr=subprocess.STDOUT, executable="/bin/bash"
)
4 changes: 3 additions & 1 deletion src/cgr_gwas_qc/testing/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,9 @@ def _sync_data(self):
]
)
try:
subprocess.run(cmd, shell=True, check=True, stderr=subprocess.STDOUT)
subprocess.run(
cmd, shell=True, check=True, stderr=subprocess.STDOUT, executable="/bin/bash"
)
except subprocess.SubprocessError:
warn(
f"Could not connect to {user}@{server}:{remote_path}. To "
Expand Down
2 changes: 1 addition & 1 deletion src/cgr_gwas_qc/workflow/scripts/median_idat_intensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main(
):
Rscript = Path(get_snakemake_conda_env(conda_env)) / "bin/Rscript"
cmd = f"{Rscript} --vanilla {rscript} {sample_id} {red} {green} {outfile}"
sp.check_output(cmd, shell=True)
sp.check_output(cmd, shell=True, executable="/bin/bash")


if __name__ == "__main__" and "snakemake" in locals():
Expand Down

0 comments on commit 8bfd534

Please sign in to comment.