diff --git a/lib/index.js b/lib/index.js index 2d9a175..fdf815c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -114,16 +114,18 @@ export default class Now extends EventEmitter { let sizeExceeded = 0; deployment.warnings.forEach(({ reason, sha, limit }) => { if ('size_limit_exceeded' === reason) { + const name = hashes.get(sha).names.pop(); console.error('> \u001b[31mWarning!\u001b[39m Skipping file %s (size exceeded %s)', - hashes.get(sha), + name, bytes(limit) ); + hashes.get(sha).names.unshift(name); // move name (hack, if duplicate matches we report them in order) sizeExceeded++; } }); if (sizeExceeded) { - console.log('> \u001b[31mWarning!\u001b[39m %d of the files ' + + console.log(`> \u001b[31mWarning!\u001b[39m ${sizeExceeded} of the files ` + 'exceeded the limit for your plan.\n' + `> See ${chalk.underline('https://zeit.co/account')} to upgrade.`); }