Skip to content

Commit daf7f9e

Browse files
committed
[*] postinstall: Don't try to link cloud specs if pkgs don't exist
Summary: see title Test Plan: manual Reviewers: evan, spang, mark, halla Reviewed By: halla Differential Revision: https://phab.nylas.com/D4446
1 parent 148fbfd commit daf7f9e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/postinstall.es6

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,16 @@ function linkJasmineConfigs() {
127127
console.log("\n---> Linking Jasmine configs");
128128
const linkToPackages = ['cloud-api', 'cloud-core', 'cloud-workers']
129129
const from = getJasmineConfigPath('isomorphic-core')
130-
131130
for (const packageName of linkToPackages) {
132-
const dir = getJasmineDir(packageName)
133-
if (!fs.existsSync(dir)) {
134-
fs.mkdirSync(dir)
131+
const packageDir = path.join('packages', packageName)
132+
if (!fs.existsSync(packageDir)) {
133+
console.log("\n---> No cloud packages to link. Moving on")
134+
return
135+
}
136+
137+
const jasmineDir = getJasmineDir(packageName)
138+
if (!fs.existsSync(jasmineDir)) {
139+
fs.mkdirSync(jasmineDir)
135140
}
136141
const to = getJasmineConfigPath(packageName)
137142
unlinkIfExistsSync(to)

0 commit comments

Comments
 (0)