clawdepl 0.0.1 → 0.0.2
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/bin/clawdepl.js +3 -3
- package/package.json +1 -1
package/bin/clawdepl.js
CHANGED
|
@@ -17,18 +17,18 @@ function getBinaryPath() {
|
|
|
17
17
|
|
|
18
18
|
// 1. Check for binary in the same directory as this script (installed by postinstall)
|
|
19
19
|
const localBinary = path.join(__dirname, binaryName);
|
|
20
|
-
if (fs.existsSync(localBinary)) {
|
|
20
|
+
if (fs.existsSync(localBinary) && fs.statSync(localBinary).isFile()) {
|
|
21
21
|
return localBinary;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// 2. Check for development binary in project root
|
|
25
25
|
const devBinary = path.join(__dirname, "..", "..", binaryName);
|
|
26
|
-
if (fs.existsSync(devBinary)) {
|
|
26
|
+
if (fs.existsSync(devBinary) && fs.statSync(devBinary).isFile()) {
|
|
27
27
|
return devBinary;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// 3. Check for binary via CLAWDEPL_BINARY_PATH env var (useful for testing)
|
|
31
|
-
if (process.env.CLAWDEPL_BINARY_PATH && fs.existsSync(process.env.CLAWDEPL_BINARY_PATH)) {
|
|
31
|
+
if (process.env.CLAWDEPL_BINARY_PATH && fs.existsSync(process.env.CLAWDEPL_BINARY_PATH) && fs.statSync(process.env.CLAWDEPL_BINARY_PATH).isFile()) {
|
|
32
32
|
return process.env.CLAWDEPL_BINARY_PATH;
|
|
33
33
|
}
|
|
34
34
|
|