Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoishin committed Dec 26, 2024
1 parent 3f80adc commit 01ea3e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from "node:path";

import chalk from "chalk";
import { Command } from "commander";
import * as HostedGitInfo from "hosted-git-info";
import HostedGitInfo from "hosted-git-info";
import npa from "npm-package-arg";
import semver, { SemVer } from "semver";

Expand Down Expand Up @@ -110,18 +110,18 @@ function action(repo: string, options: { dev: boolean }) {

// If a bundle has no git tags, target will be null.
if (target) {
process.stdout.write(`Checking out version ${target}... `);
process.stdout.write(`Checking out version ${target.version}... `);
try {
// First try the target as-is.
execSync(`git checkout ${target}`, {
execSync(`git checkout ${target.version}`, {
cwd: bundlePath,
stdio: ["pipe", "pipe", "pipe"],
});
process.stdout.write(chalk.green("done!") + os.EOL);
} catch (_) {
try {
// Next try prepending `v` to the target, which may have been stripped by `semver.coerce`.
execSync(`git checkout v${target}`, {
execSync(`git checkout v${target.version}`, {
cwd: bundlePath,
stdio: ["pipe", "pipe", "pipe"],
});
Expand Down

0 comments on commit 01ea3e3

Please sign in to comment.