starship-butler-utils 0.0.2 → 0.1.0
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/dist/index.js +2 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100,8 +100,7 @@ function copyFile(sourcePath, targetPath, force = false) {
|
|
|
100
100
|
if (isExist) removeFile(`${targetPath}.bak`);
|
|
101
101
|
} catch (error) {
|
|
102
102
|
if (isExist) renameSync(`${targetPath}.bak`, targetPath);
|
|
103
|
-
|
|
104
|
-
return false;
|
|
103
|
+
throw error;
|
|
105
104
|
}
|
|
106
105
|
return true;
|
|
107
106
|
}
|
|
@@ -123,8 +122,7 @@ async function createSymlink(sourcePath, targetPath, force = false) {
|
|
|
123
122
|
if (isExist) removeFile(`${targetPath}.bak`);
|
|
124
123
|
} catch (error) {
|
|
125
124
|
if (isExist) renameSync(`${targetPath}.bak`, targetPath);
|
|
126
|
-
|
|
127
|
-
return false;
|
|
125
|
+
throw error;
|
|
128
126
|
}
|
|
129
127
|
return true;
|
|
130
128
|
}
|