Skip to content

refactor: replace symlinks with file copy#24

Merged
eumaninho54 merged 1 commit into
release/v0.3.1from
feat/copy-instead-of-symlink
May 1, 2026
Merged

refactor: replace symlinks with file copy#24
eumaninho54 merged 1 commit into
release/v0.3.1from
feat/copy-instead-of-symlink

Conversation

@eumaninho54

Copy link
Copy Markdown
Member

🚀 Summary

Replaces symlink logic in the aiworkers setup command with direct file/directory copying. Since AIWorkers is now an npm package installed globally, symlinks pointing back to the package directory are unnecessary — copying is simpler and works the same on all platforms without special handling.

Type of change

  • refactor — code restructuring

📝 Changes

  • bin/commands/setup.js — removed isWindows, ensureDir, symlink, linkDir, linkFiles. Replaced with copyDir (fs.cpSync recursive) and copyFiles (fs.copyFileSync). Cross-platform by default.

🧪 Testing

  • Existing tests pass
  • New tests added (if applicable)
  • Tested manually

🎟️ Related Tickets

  • Related Issue #
  • Closes #

Removed platform-specific symlink logic (Windows junction vs. dir symlinks)
and replaced with cross-platform fs.cpSync and fs.copyFileSync operations.
Simplifies code by eliminating isWindows detection and related helper
functions (ensureDir, symlink, linkDir, linkFiles). Updated messaging
from "Linking to" to "Copying to".

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@eumaninho54 eumaninho54 merged commit 1d6be66 into release/v0.3.1 May 1, 2026
1 check passed
@eumaninho54 eumaninho54 deleted the feat/copy-instead-of-symlink branch May 1, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant