skill-linker 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-linker",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "Interactive CLI to link AI Agent Skills to various agents (Claude, Copilot, Antigravity, Cursor, etc.)",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -32,10 +32,12 @@ function ensureDir(dirPath) {
32
32
  */
33
33
  function createSymlink(source, target) {
34
34
  try {
35
- // Remove existing link/file if present
36
- if (fs.existsSync(target) || fs.lstatSync(target).isSymbolicLink()) {
37
- fs.unlinkSync(target);
38
- }
35
+ // Ensure parent directory exists
36
+ ensureDir(path.dirname(target));
37
+
38
+ // Remove existing link/file/directory if present
39
+ // force: true makes it ignore the error if file doesn't exist
40
+ fs.rmSync(target, { recursive: true, force: true });
39
41
 
40
42
  fs.symlinkSync(source, target, 'dir');
41
43
  return true;