Skip to content

build: build:dashboard uses 'cp -r dist dashboard-dist' which nests on re-run #703

@waleedkadous

Description

@waleedkadous

Problem

`packages/codev/package.json` has:

```json
"build:dashboard": "cd ../dashboard && pnpm build && cp -r dist ../../packages/codev/dashboard-dist"
```

`cp -r dist ` behaves differently depending on whether `` exists:

  • If absent: copy contents → target. Correct.
  • If present (a directory): create `/dist`. Wrong.

So the first build is correct, but every subsequent build nests another `dist/` inside `dashboard-dist/`. After many rebuilds you get `dashboard-dist/dist/dist/dist/...`. Discovered while debugging the v3.0.0-rc.12 reinstall on 2026-04-25.

Fix

Either:

```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -r dist ../../packages/codev/dashboard-dist"
```

Or (POSIX-portable):

```json
"build:dashboard": "cd ../dashboard && pnpm build && rm -rf ../../packages/codev/dashboard-dist && cp -R dist/ ../../packages/codev/dashboard-dist/"
```

Acceptance

  • Running `pnpm build` twice in a row leaves `packages/codev/dashboard-dist/` with the same flat structure both times.
  • No nested `dashboard-dist/dist/` directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions