Skip to content

Commit

Permalink
Removes extraneous script warnings (#2103)
Browse files Browse the repository at this point in the history
* Fixes extraneous warnings

* Versions
  • Loading branch information
arcanis authored Nov 9, 2020
1 parent 00e88a9 commit 4f72425
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .yarn/versions/c0cc9126.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
releases:
"@yarnpkg/cli": patch
"@yarnpkg/plugin-pnp": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-node-modules"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/core"
- "@yarnpkg/doctor"
3 changes: 3 additions & 0 deletions packages/plugin-pnp/sources/jsInstallUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export function extractBuildScripts(pkg: Package, requirements: ExtractBuildScri
if (!requirements.manifest.scripts.has(`install`) && requirements.misc.hasBindingGyp)
buildScripts.push([BuildType.SHELLCODE, `node-gyp rebuild`]);

if (buildScripts.length === 0)
return [];

if (!configuration.get(`enableScripts`) && !dependencyMeta.built) {
report?.reportWarningOnce(MessageName.DISABLED_BUILD_SCRIPTS, `${structUtils.prettyLocator(configuration, pkg)} lists build scripts, but all build scripts have been disabled.`);
return [];
Expand Down

0 comments on commit 4f72425

Please sign in to comment.