From 5af0e064a4c0d135741414073e28adf683e7a916 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Wed, 22 Mar 2017 11:04:33 +0100 Subject: [PATCH] Fix undefined error when package has no binaries Today we installed a package which apparently didn't have any binary. The console message however was: `warning undefined has no binaries`. This happens because [`packageHasNoBinaries`](https://github.com/yarnpkg/yarn/blob/6e9a9a6596ca8f177f68f6672a1ef4ff16705336/src/reporters/lang/en.js#L252) has 1 argument, which this call to the reporter does not serve. Therefore the package name will be undefined. --- src/cli/commands/global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/commands/global.js b/src/cli/commands/global.js index 1640388eaf..99b80c0e5d 100644 --- a/src/cli/commands/global.js +++ b/src/cli/commands/global.js @@ -165,7 +165,7 @@ function ls(manifest: Manifest, reporter: Reporter, saved: boolean) { } reporter.list(`bins-${manifest.name}`, bins); } else if (saved) { - reporter.warn(reporter.lang('packageHasNoBinaries')); + reporter.warn(reporter.lang('packageHasNoBinaries', human)); } }