Skip to content

Commit 79261d8

Browse files
authored
fix: python is no longer a valid npm config setting
Remove misleading warnings. % `npm config list -l | grep python ` # no hits % `npm config set python=3.14` > npm error `python` is not a valid npm option <!-- Thank you for your pull request. Please review the below requirements. Contributor guide: https://github.com/nodejs/node/blob/main/CONTRIBUTING.md --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `npm install && npm run lint && npm test` passes - [ ] tests are included <!-- Bug fixes and new features should include tests --> - [ ] documentation is changed or added - [x] commit message follows [commit guidelines](https://github.com/googleapis/release-please#how-should-i-write-my-commits) ##### Description of change <!-- Provide a description of the change -->
1 parent ee9cbdd commit 79261d8

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

lib/find-python.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,11 @@ class PythonFinder {
8787
before: () => {
8888
if (!this.configPython) {
8989
this.addLog(
90-
'Python is not set from command line or npm configuration')
90+
'--python= is not set from command line')
9191
return SKIP
9292
}
93-
this.addLog('checking Python explicitly set from command line or ' +
94-
'npm configuration')
95-
this.addLog('- "--python=" or "npm config get python" is ' +
96-
`"${this.configPython}"`)
93+
this.addLog('checking Python explicitly set from command line')
94+
this.addLog(`- "--python=${this.configPython}"`)
9795
},
9896
check: () => this.checkCommand(this.configPython)
9997
},
@@ -295,8 +293,6 @@ class PythonFinder {
295293
`- Use the switch --python="${pathExample}"`,
296294
' (accepted by both node-gyp and npm)',
297295
'- Set the environment variable PYTHON',
298-
'- Set the npm configuration variable python:',
299-
` npm config set python "${pathExample}"`,
300296
'For more information consult the documentation at:',
301297
'https://github.com/nodejs/node-gyp#installation',
302298
'**********************************************************'

0 commit comments

Comments
 (0)