(err)
| 114 | } |
| 115 | |
| 116 | #logConsoleError (err) { |
| 117 | // Run our error message formatters on all errors even if we have no npm or an unloaded npm. |
| 118 | // This will clean the error and possible return a formatted message about EACCESS or something. |
| 119 | const { summary, detail } = errorMessage(err, this.#npm) |
| 120 | const formatted = [...new Set([...summary, ...detail].flat().filter(Boolean))].join('\n') |
| 121 | // If we didn't get anything from the formatted message then just display the full stack |
| 122 | // eslint-disable-next-line no-console |
| 123 | console.error(formatted === err.message ? err.stack : formatted) |
| 124 | } |
| 125 | |
| 126 | #logNoNpmError (err) { |
| 127 | if (this.#hasNpm) { |
no test coverage detected