Skip to content

Commit

Permalink
make file:// conditional on depth
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Jul 18, 2023
1 parent 54578f6 commit e531354
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion planemo/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ def _install_galaxy_via_download(ctx, galaxy_root, env, kwds):
def _install_galaxy_via_git(ctx, galaxy_root, env, kwds):
gx_repo = _ensure_galaxy_repository_available(ctx, kwds)
branch = _galaxy_branch(kwds)
command = git.command_clone(ctx, f"file://{gx_repo}", galaxy_root, branch=branch, depth=1)
command = git.command_clone(ctx, gx_repo", galaxy_root, branch=branch, depth=1)
exit_code = shell(command, env=env)
if exit_code != 0:
raise Exception("Failed to clone Galaxy via git")
Expand Down
3 changes: 3 additions & 0 deletions planemo/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import subprocess
import urllib
from typing import (
Dict,
List,
Expand Down Expand Up @@ -100,6 +101,8 @@ def command_clone(
cmd.extend(["--branch", branch])
if depth is not None:
cmd.extend(["--depth", str(depth)])
if urllib.parse.urlparse(src).scheme == "":
src = "file://{src}"
cmd.extend([src, dest])
return cmd

Expand Down

0 comments on commit e531354

Please sign in to comment.