From 148fbfd936b58293c7a36de560b30733316e15f2 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Mon, 17 Apr 2017 17:37:26 -0700 Subject: [PATCH] [*] Postinstall should install client-sync regardless of private plugins Summary: see title Test Plan: manual Reviewers: spang, evan, mark, halla Reviewed By: halla Differential Revision: https://phab.nylas.com/D4445 --- scripts/postinstall.es6 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/postinstall.es6 b/scripts/postinstall.es6 index ee980e688..5bfdab938 100644 --- a/scripts/postinstall.es6 +++ b/scripts/postinstall.es6 @@ -32,7 +32,16 @@ function copyErrorLoggerExtensions(privateDir) { fs.copySync(from, to); } -async function installPrivateResources() { +function installClientSyncPackage() { + console.log("\n---> Linking client-sync") + // link client-sync + const clientSyncDir = path.resolve(path.join('packages', 'client-sync')); + const destination = path.resolve(path.join('packages', 'client-app', 'internal_packages', 'client-sync')); + unlinkIfExistsSync(destination); + fs.symlinkSync(clientSyncDir, destination, 'dir'); +} + +function installPrivateResources() { console.log("\n---> Linking private plugins") const privateDir = path.resolve(path.join('packages', 'client-private-plugins')) if (!fs.existsSync(privateDir)) { @@ -49,12 +58,6 @@ async function installPrivateResources() { unlinkIfExistsSync(to); fs.symlinkSync(from, to, 'dir'); } - - // link client-sync - const clientSyncDir = path.resolve(path.join('packages', 'client-sync')); - const destination = path.resolve(path.join('packages', 'client-app', 'internal_packages', 'client-sync')); - unlinkIfExistsSync(destination); - fs.symlinkSync(clientSyncDir, destination, 'dir'); } async function lernaBootstrap(installTarget) { @@ -161,7 +164,8 @@ async function main() { console.log(`\n---> Installing for target ${installTarget}`); if ([TARGET_ALL, TARGET_CLIENT].includes(installTarget)) { - await installPrivateResources() + installPrivateResources() + installClientSyncPackage() } await lernaBootstrap(installTarget);