Skip to content

Commit dacd9d6

Browse files
committed
out of dev branches error
1 parent 7979c1e commit dacd9d6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • packages/cli-v3/src/commands

packages/cli-v3/src/commands/dev.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,15 @@ async function startDev(options: StartDevOptions) {
297297
logger.debug("Initial config", watcher.config);
298298

299299
if (!isDefaultDevBranch(branch)) {
300-
await apiClient.upsertBranch(watcher.config.project, { branch, env: "development" });
300+
const upsertResult = await apiClient.upsertBranch(watcher.config.project, {
301+
branch,
302+
env: "development",
303+
});
304+
305+
if (!upsertResult.success) {
306+
logger.error(`Failed to use branch "${branch}": ${upsertResult.error}`);
307+
process.exit(1);
308+
}
301309
}
302310

303311
// eslint-disable-next-line no-inner-declarations

0 commit comments

Comments
 (0)