mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复 apt 命令
This commit is contained in:
parent
3bda26fd58
commit
0f56fac29a
|
@ -521,7 +521,7 @@ export function getGetCommand(type: DependenceTypes, name: string): string {
|
|||
const baseCommands = {
|
||||
[DependenceTypes.nodejs]: `pnpm ls -g | grep "${name}" | head -1`,
|
||||
[DependenceTypes.python3]: `python3 -c "import sys, importlib.util; from importlib.metadata import version, PackageNotFoundError; m=sys.argv[1]; spec=importlib.util.find_spec(m); print(version(m) if spec and 'site-packages' in (spec.origin or '') else (m if spec else ''))" ${name}`,
|
||||
[DependenceTypes.linux]: `apk info -es ${name}`,
|
||||
[DependenceTypes.linux]: `apt-get info ${name}`,
|
||||
};
|
||||
|
||||
return baseCommands[type];
|
||||
|
|
Loading…
Reference in New Issue
Block a user