diff --git a/src/commands/link/index.ts b/src/commands/link/index.ts index 77fb149..dbdb956 100644 --- a/src/commands/link/index.ts +++ b/src/commands/link/index.ts @@ -116,7 +116,8 @@ export default class LinkIndex extends Command { try { currentBranch = execSync("git symbolic-ref --short HEAD", { encoding: "utf-8" }).trim(); } catch (error) { - throw new Error(chalk.red("Unable to determine the current branch. Are you inside a Git repository?")); + this.log(chalk.red("Unable to determine the current branch. Are you inside a Git repository?")); + throw error; } if (currentBranch !== "main") {