Skip to content

Commit 55cba56

Browse files
committed
don't error when output directory already exists
1 parent 24a9465 commit 55cba56

File tree

1 file changed

+2
-2
lines changed
  • packages/@apphosting/adapter-nextjs/src

1 file changed

+2
-2
lines changed

packages/@apphosting/adapter-nextjs/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { NextConfigComplete } from "next/dist/server/config-shared.js";
1515
import { OutputBundleConfig } from "@apphosting/common";
1616

1717
// fs-extra is CJS, readJson can't be imported using shorthand
18-
export const { copy, exists, writeFile, readJson, readdir, readFileSync, existsSync, mkdir } =
18+
export const { copy, exists, writeFile, readJson, readdir, readFileSync, existsSync, ensureDir } =
1919
fsExtra;
2020

2121
// Loads the user's next.config.js file.
@@ -181,7 +181,7 @@ async function generateBundleYaml(
181181
nextVersion: string,
182182
adapterMetadata: AdapterMetadata,
183183
): Promise<void> {
184-
await mkdir(opts.outputDirectoryBasePath);
184+
await ensureDir(opts.outputDirectoryBasePath);
185185
const outputBundle: OutputBundleConfig = {
186186
version: "v1",
187187
runConfig: {

0 commit comments

Comments
 (0)