opendraft 1.6.2 → 1.6.3
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/opendraft.js +5 -11
- package/package.json +1 -1
package/bin/opendraft.js
CHANGED
|
@@ -161,9 +161,9 @@ function runOpendraft(pythonCmd, args) {
|
|
|
161
161
|
pyVersion = versionOutput;
|
|
162
162
|
} catch (e) {}
|
|
163
163
|
|
|
164
|
-
// Common locations for pip-installed
|
|
164
|
+
// Common locations for pip-installed Python opendraft command
|
|
165
|
+
// NOTE: Do NOT include bare 'opendraft' - it may resolve to this npm wrapper and cause infinite loop
|
|
165
166
|
const possiblePaths = [
|
|
166
|
-
'opendraft', // In PATH
|
|
167
167
|
`${home}/.local/bin/opendraft`, // pip --user on Linux/Mac
|
|
168
168
|
`${home}/Library/Python/${pyVersion}/bin/opendraft`, // macOS user install for detected version
|
|
169
169
|
`${home}/Library/Python/3.13/bin/opendraft`, // macOS Python 3.13
|
|
@@ -171,24 +171,18 @@ function runOpendraft(pythonCmd, args) {
|
|
|
171
171
|
`${home}/Library/Python/3.11/bin/opendraft`, // macOS Python 3.11
|
|
172
172
|
`${home}/Library/Python/3.10/bin/opendraft`, // macOS Python 3.10
|
|
173
173
|
`${home}/Library/Python/3.9/bin/opendraft`, // macOS Python 3.9
|
|
174
|
-
'/opt/homebrew/bin/opendraft', // Homebrew
|
|
175
|
-
'/usr/local/bin/opendraft', // System-wide
|
|
176
174
|
'/Library/Frameworks/Python.framework/Versions/3.13/bin/opendraft',
|
|
177
175
|
'/Library/Frameworks/Python.framework/Versions/3.12/bin/opendraft',
|
|
178
176
|
'/Library/Frameworks/Python.framework/Versions/3.11/bin/opendraft',
|
|
177
|
+
'/Library/Frameworks/Python.framework/Versions/3.10/bin/opendraft',
|
|
179
178
|
];
|
|
180
179
|
|
|
181
180
|
// Try each possible path
|
|
182
181
|
for (const cmdPath of possiblePaths) {
|
|
183
182
|
try {
|
|
184
|
-
|
|
185
|
-
execSync('which opendraft', { encoding: 'utf8', stdio: 'pipe' });
|
|
186
|
-
} else {
|
|
187
|
-
execSync(`test -x "${cmdPath}"`, { encoding: 'utf8', stdio: 'pipe' });
|
|
188
|
-
}
|
|
183
|
+
execSync(`test -x "${cmdPath}"`, { encoding: 'utf8', stdio: 'pipe' });
|
|
189
184
|
|
|
190
|
-
const
|
|
191
|
-
const proc = spawn(actualCmd, args, {
|
|
185
|
+
const proc = spawn(cmdPath, args, {
|
|
192
186
|
stdio: 'inherit',
|
|
193
187
|
env: process.env
|
|
194
188
|
});
|