Skip to content

Commit 45e472b

Browse files
authored
Throw when no default targets are found (#129)
1 parent 828145a commit 45e472b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

packages/cmake-rn/src/cli.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,17 @@ export const program = new Command("cmake-rn")
156156
triplets.add("arm64-apple-ios-sim");
157157
}
158158
}
159-
console.error(
160-
chalk.yellowBright("ℹ"),
161-
"Using default triplets",
162-
chalk.dim("(" + [...triplets].join(", ") + ")")
163-
);
159+
if (triplets.size === 0) {
160+
throw new Error(
161+
"Found no default triplets: Install some platform specific build tools"
162+
);
163+
} else {
164+
console.error(
165+
chalk.yellowBright("ℹ"),
166+
"Using default triplets",
167+
chalk.dim("(" + [...triplets].join(", ") + ")")
168+
);
169+
}
164170
}
165171

166172
const tripletContext = [...triplets].map((triplet) => {

0 commit comments

Comments
 (0)