travel-agent-cli 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -37,6 +37,7 @@ function getVenvPython() {
|
|
|
37
37
|
|
|
38
38
|
// 检查 Python 是否可用
|
|
39
39
|
function findPython() {
|
|
40
|
+
const { execSync } = require('child_process');
|
|
40
41
|
const candidates = ['python3', 'python'];
|
|
41
42
|
|
|
42
43
|
for (const cmd of candidates) {
|
|
@@ -134,7 +135,7 @@ function run() {
|
|
|
134
135
|
|
|
135
136
|
// 如果没有虚拟环境,使用系统 Python
|
|
136
137
|
if (!pythonCmd) {
|
|
137
|
-
pythonCmd =
|
|
138
|
+
pythonCmd = findPython();
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
if (!pythonCmd) {
|