Skip to content

Commit

Permalink
use AgentName type from package-manager-detector
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz committed Sep 30, 2024
1 parent e4798f0 commit 3f58a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cloudflare/src/cli/build/build-next-app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { detect } from "package-manager-detector";
import { type AgentName as PackageManager, detect } from "package-manager-detector";
import { execSync } from "node:child_process";

/**
Expand All @@ -19,7 +19,7 @@ export async function buildNextjsApp(nextAppDir: string): Promise<void> {
}

// equivalent to: https://github.com/sst/open-next/blob/f61b0e94/packages/open-next/src/build.ts#L175-L186
function runNextBuildCommand(packager: "npm" | "pnpm" | "yarn" | "bun", nextAppDir: string) {
function runNextBuildCommand(packager: PackageManager, nextAppDir: string) {
const command = `${packager === "npm" ? "npx" : packager} next build`;
execSync(command, {
stdio: "inherit",
Expand Down

0 comments on commit 3f58a2e

Please sign in to comment.