(addonPath)
| 1688 | } |
| 1689 | |
| 1690 | function ensureTargetDirIsAddon(addonPath) { |
| 1691 | let projectInfo; |
| 1692 | |
| 1693 | try { |
| 1694 | projectInfo = require(path.join(addonPath, 'package.json')); |
| 1695 | } catch (err) { |
| 1696 | if (err.code === 'MODULE_NOT_FOUND') { |
| 1697 | throw new Error(`The directory ${addonPath} does not appear to be a valid addon directory.`); |
| 1698 | } else { |
| 1699 | throw err; |
| 1700 | } |
| 1701 | } |
| 1702 | |
| 1703 | return isAddon(projectInfo.keywords); |
| 1704 | } |
| 1705 | |
| 1706 | /** |
| 1707 | @private |
no outgoing calls
no test coverage detected
searching dependent graphs…