mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-14 04:50:50 +08:00
Fix pyproject.toml path handling and add error handling
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
co-authored by
whyour
parent
f526d3f972
commit
023d0f1cc4
+2
-2
@@ -600,8 +600,8 @@ export function getInstallCommand(type: DependenceTypes, name: string): string {
|
||||
// Check if it's a pyproject.toml file
|
||||
if (trimmedName.endsWith('pyproject.toml')) {
|
||||
// For pyproject.toml, install from the directory containing it
|
||||
const dir = trimmedName.replace(/\/pyproject\.toml$/, '') || '.';
|
||||
return `${command} ${dir}`;
|
||||
const dir = trimmedName.replace(/\/pyproject\.toml$/, '');
|
||||
return dir && dir !== 'pyproject.toml' ? `${command} ${dir}` : `${command} .`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user