Skip to content

Commit ffd08dc

Browse files
committed
Throw when no default targets are found
1 parent d9e1a96 commit ffd08dc

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
@@ -143,11 +143,17 @@ export const program = new Command("cmake-rn")
143143
triplets.add("arm64-apple-ios-sim");
144144
}
145145
}
146-
console.error(
147-
chalk.yellowBright("ℹ"),
148-
"Using default triplets",
149-
chalk.dim("(" + [...triplets].join(", ") + ")")
150-
);
146+
if (triplets.size === 0) {
147+
throw new Error(
148+
"Found no default triplets: Install some platform specific build tools"
149+
);
150+
} else {
151+
console.error(
152+
chalk.yellowBright("ℹ"),
153+
"Using default triplets",
154+
chalk.dim("(" + [...triplets].join(", ") + ")")
155+
);
156+
}
151157
}
152158

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

0 commit comments

Comments
 (0)