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 +1 -1
- package/src/utils/file-system.js +6 -4
package/package.json
CHANGED
package/src/utils/file-system.js
CHANGED
|
@@ -32,10 +32,12 @@ function ensureDir(dirPath) {
|
|
|
32
32
|
*/
|
|
33
33
|
function createSymlink(source, target) {
|
|
34
34
|
try {
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
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;
|