datai-sdk 1.1.0 → 1.1.1
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/postinstall-script.js +4 -2
package/package.json
CHANGED
package/postinstall-script.js
CHANGED
|
@@ -9,9 +9,11 @@ const destinationFolder = path.resolve(
|
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
// Check if the source folder exists
|
|
12
|
+
// If it doesn't exist, the script was likely already run or this is an npm install
|
|
13
|
+
// In either case, we can safely exit without error
|
|
12
14
|
if (!fs.existsSync(sourceFolder)) {
|
|
13
|
-
console.
|
|
14
|
-
process.exit(
|
|
15
|
+
console.log(`Source folder "${sourceFolder}" does not exist. Skipping postinstall (already configured or installed from npm).`);
|
|
16
|
+
process.exit(0);
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
// Create node_modules folder if it doesn't exist
|