Skip to content

Commit

Permalink
Fix oopsie daisy
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Jan 21, 2025
1 parent f659800 commit 1f76c16
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execSync } from "node:child_process";
import { cpSync } from "node:fs";
import { cpSync, existsSync } from "node:fs";
import { resolve } from "node:path";
import { blue } from "colorette";
import { detectSync, resolveCommand } from "package-manager-detector";
Expand Down Expand Up @@ -100,16 +100,10 @@ function pagefindDevelop(options: PagefindDevelopOptions) {

switch (developStrategy) {
case "lazy": {
const bundleInsideAssets = execSync(
resolve(absoluteAssetsDirectory, bundleDirectory),
);
if (bundleInsideAssets) {
if (existsSync(resolve(absoluteAssetsDirectory, bundleDirectory))) {
return;
}
const bundleInsideOutput = execSync(
resolve(absoluteOutputDirectory, bundleDirectory),
);
if (bundleInsideOutput) {
if (existsSync(resolve(absoluteOutputDirectory, bundleDirectory))) {
copyBundle();
return;
}
Expand Down

0 comments on commit 1f76c16

Please sign in to comment.