From ae000d6402ae911312b24934967e691a29fbe7b2 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 29 Dec 2025 11:27:38 +0100 Subject: [PATCH] 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 ##### Checklist - [ ] `npm install && npm run lint && npm test` passes - [ ] tests are included - [ ] 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 --- lib/find-python.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/find-python.js b/lib/find-python.js index a71c00c2b6..273b5957b4 100644 --- a/lib/find-python.js +++ b/lib/find-python.js @@ -86,14 +86,10 @@ class PythonFinder { { before: () => { if (!this.configPython) { - this.addLog( - 'Python is not set from command line or npm configuration') + this.addLog('--python was not set on the command line') return SKIP } - this.addLog('checking Python explicitly set from command line or ' + - 'npm configuration') - this.addLog('- "--python=" or "npm config get python" is ' + - `"${this.configPython}"`) + this.addLog(`--python=${this.configPython} was set on the command line`) }, check: () => this.checkCommand(this.configPython) }, @@ -295,8 +291,6 @@ class PythonFinder { `- Use the switch --python="${pathExample}"`, ' (accepted by both node-gyp and npm)', '- Set the environment variable PYTHON', - '- Set the npm configuration variable python:', - ` npm config set python "${pathExample}"`, 'For more information consult the documentation at:', 'https://github.com/nodejs/node-gyp#installation', '**********************************************************'