Skip to content

Commit

Permalink
Only deduplicate output dirs if input is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
vdrg committed Oct 22, 2024
1 parent d4d4f3a commit 38561e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/deploy/findLibraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { createPrepareDeploy } from "./createPrepareDeploy";
import path from "path";

export function findLibraries(forgeOutDirs: string | string[]): Library[] {
const dirs = Array.isArray(forgeOutDirs) ? forgeOutDirs : [forgeOutDirs];
const dirs = Array.isArray(forgeOutDirs) ? [...new Set(forgeOutDirs)] : [forgeOutDirs];

// Deduplicate output directories and get all the artifacts
const artifactsWithDirs = [...new Set(dirs)].flatMap((dir) => {
const artifactsWithDirs = dirs.flatMap((dir) => {
const files = globSync(`${dir}/**/*.json`, { ignore: "/**/*.abi.json" }).sort();
return files.map((filePath) => ({
forgeOutDir: dir,
Expand Down

0 comments on commit 38561e1

Please sign in to comment.