Skip to content

pnpm examples follows symlinks out of a game and can replace .examples/.data #297

Open

Description

@Exeloo

Which tooling is this bug report for?

other

Issue description

pnpm examples (scripts/examples.mjs) has two edge cases in how it copies a game:

  • It copies with cpSync(..., { dereference: true }) (examples.mjs#L134), so a symlink inside a game is followed wherever it points: a link to a large or parent folder makes the copy huge or recurse until it fails.
  • It replaces .examples/<name> (examples.mjs#L131), and pnpm example keeps the editor's data folder in .examples/.data (example.mjs#L31). A game folder named .data would replace that data folder.

Found by the review of #295. The engine's scripts/examples.ts (NanoForge-dev/Engine#516) follows symlinks the same way.

Versions

  • editor branch feat/examples-games (0610656)
  • Node 26, pnpm 12, Linux

Issue priority

Low (slightly annoying)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions