HubSpot / prettier-maven-plugin

Apache License 2.0
115 stars 22 forks source link

use provided nodePath for npm if npmPath is npm-cli.js #89

Closed jaredstehler closed 1 year ago

jaredstehler commented 1 year ago

currently, if you specify a provided nodePath and npmPath, the prettier downloader invokes npmPath directly, which requires node on the PATH.

updates the npm command to use the provided nodePath, if the provided npmPath references an npm-cli.js. this matches the logic which uses the downloaded node runtime for npm: https://github.com/HubSpot/prettier-maven-plugin/blob/7104b57ae1d17cbf46fe114dfbef12ca8a3cd88e/prettier-maven-plugin/src/main/java/com/hubspot/maven/plugins/prettier/internal/OperatingSystemFamily.java#L88-L91

@stevie400 @Xcelled @suruuK @kmclarnon