Permalink
Browse files

Fix issues with pollParams and link

  • Loading branch information...
grabbou committed Mar 20, 2018
1 parent 85b690f commit ca8ce83cc3c38751604afce5a3e2f0473d9cba91
Showing with 11 additions and 11 deletions.
  1. +11 −11 local-cli/link/link.js
View
@@ -37,7 +37,9 @@ log.heading = 'rnpm-link';
const dedupeAssets = (assets) => uniqBy(assets, asset => path.basename(asset));
const linkDependency = (platforms, project, dependency) => {
const linkDependency = async (platforms, project, dependency) => {
const params = await pollParams(dependency.config.params);
Object.keys(platforms || {})
.forEach(platform => {
if (!project[platform] || !dependency.config[platform]) {
@@ -56,18 +58,16 @@ const linkDependency = (platforms, project, dependency) => {
return null;
}
return pollParams(dependency.config.params).then(params => {
log.info(`Linking ${dependency.name} ${platform} dependency`);
log.info(`Linking ${dependency.name} ${platform} dependency`);
linkConfig.register(
dependency.name,
dependency.config[platform],
params,
project[platform]
);
linkConfig.register(
dependency.name,
dependency.config[platform],
params,
project[platform]
);
log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
});
log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
});
};

0 comments on commit ca8ce83

Please sign in to comment.