clan-cli: deprecate nix_shell() in favor of run_cmd()
This commit is contained in:
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
from typing import Any, Literal
|
||||
|
||||
from clan_cli.errors import ClanError
|
||||
from clan_cli.nix import nix_shell, run_no_stdout
|
||||
from clan_cli.nix import run_cmd, run_no_stdout
|
||||
|
||||
from . import API
|
||||
|
||||
@@ -117,7 +117,7 @@ def show_block_devices() -> Blockdevices:
|
||||
Abstract api method to show block devices.
|
||||
It must return a list of block devices.
|
||||
"""
|
||||
cmd = nix_shell(["nixpkgs#util-linux"], ["lsblk", "--json"])
|
||||
cmd = run_cmd(["util-linux"], ["lsblk", "--json"])
|
||||
proc = run_no_stdout(cmd)
|
||||
res = proc.stdout.strip()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import re
|
||||
from dataclasses import dataclass
|
||||
|
||||
from clan_cli.cmd import run_no_stdout
|
||||
from clan_cli.nix import nix_shell
|
||||
from clan_cli.nix import run_cmd
|
||||
|
||||
from . import API
|
||||
|
||||
@@ -89,8 +89,8 @@ def parse_avahi_output(output: str) -> DNSInfo:
|
||||
|
||||
@API.register
|
||||
def show_mdns() -> DNSInfo:
|
||||
cmd = nix_shell(
|
||||
["nixpkgs#avahi"],
|
||||
cmd = run_cmd(
|
||||
["avahi"],
|
||||
[
|
||||
"avahi-browse",
|
||||
"--all",
|
||||
|
||||
Reference in New Issue
Block a user