Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit 37e6ca7a30.
This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
from clan_cli.custom_logger import setup_logging
|
||||
from clan_cli.nix import run_cmd
|
||||
from clan_cli.nix import nix_shell
|
||||
|
||||
pytest_plugins = [
|
||||
"temporary_dir",
|
||||
@@ -32,12 +32,12 @@ def pytest_sessionstart(session: pytest.Session) -> None:
|
||||
@pytest.fixture
|
||||
def git_repo(tmp_path: Path) -> Path:
|
||||
# initialize a git repository
|
||||
cmd = run_cmd(["git"], ["git", "init"])
|
||||
cmd = nix_shell(["nixpkgs#git"], ["git", "init"])
|
||||
subprocess.run(cmd, cwd=tmp_path, check=True)
|
||||
# set user.name and user.email
|
||||
cmd = run_cmd(["git"], ["git", "config", "user.name", "test"])
|
||||
cmd = nix_shell(["nixpkgs#git"], ["git", "config", "user.name", "test"])
|
||||
subprocess.run(cmd, cwd=tmp_path, check=True)
|
||||
cmd = run_cmd(["git"], ["git", "config", "user.email", "test@test.test"])
|
||||
cmd = nix_shell(["nixpkgs#git"], ["git", "config", "user.email", "test@test.test"])
|
||||
subprocess.run(cmd, cwd=tmp_path, check=True)
|
||||
# return the path to the git repository
|
||||
return tmp_path
|
||||
|
||||
Reference in New Issue
Block a user