Skip to content

Commit c7c678f

Browse files
authored
fix: python is no longer a valid npm config setting (#3258)
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 f15b79a commit c7c678f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/find-python.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,10 @@ class PythonFinder {
8686
{
8787
before: () => {
8888
if (!this.configPython) {
89-
this.addLog(
90-
'Python is not set from command line or npm configuration')
89+
this.addLog('--python was not set on the command line')
9190
return SKIP
9291
}
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}"`)
92+
this.addLog(`--python=${this.configPython} was set on the command line`)
9793
},
9894
check: () => this.checkCommand(this.configPython)
9995
},
@@ -295,8 +291,6 @@ class PythonFinder {
295291
`- Use the switch --python="${pathExample}"`,
296292
' (accepted by both node-gyp and npm)',
297293
'- Set the environment variable PYTHON',
298-
'- Set the npm configuration variable python:',
299-
` npm config set python "${pathExample}"`,
300294
'For more information consult the documentation at:',
301295
'https://github.com/nodejs/node-gyp#installation',
302296
'**********************************************************'

0 commit comments

Comments
 (0)