@abdulr7man/pensieve 1.2.2 → 1.2.3
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/VERSION +1 -1
- package/package.json +1 -1
- package/src/installer/home.cjs +10 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v1.2.
|
|
1
|
+
v1.2.3
|
package/package.json
CHANGED
package/src/installer/home.cjs
CHANGED
|
@@ -112,6 +112,12 @@ function buildSharedHome(HOME, { version, log }) {
|
|
|
112
112
|
const binDir = path.join(home, 'bin');
|
|
113
113
|
fs.mkdirSync(binDir, { recursive: true });
|
|
114
114
|
const sdkBin = path.join(binDir, 'pensieve-sdk');
|
|
115
|
+
// COLLISION FIX (v1.2.3): a pre-existing ~/.pensieve from the .sh installer
|
|
116
|
+
// symlinks bin/pensieve-sdk INTO a repo checkout — writeFileSync would
|
|
117
|
+
// FOLLOW that link and overwrite the repo's SDK bin with this shim (found
|
|
118
|
+
// live on the owner's machine). Remove the path FIRST: the shim REPLACES
|
|
119
|
+
// whatever is there (symlink or file), never writes through it.
|
|
120
|
+
fs.rmSync(sdkBin, { force: true, recursive: true });
|
|
115
121
|
fs.writeFileSync(sdkBin,
|
|
116
122
|
'#!/usr/bin/env node\n'
|
|
117
123
|
+ "// PENSIEVE launcher — delegates to the self-contained copy at ~/.pensieve/sdk\n"
|
|
@@ -119,7 +125,10 @@ function buildSharedHome(HOME, { version, log }) {
|
|
|
119
125
|
fs.chmodSync(sdkBin, 0o755);
|
|
120
126
|
const smoke = spawnSync(process.execPath, [sdkBin, 'help'], { encoding: 'utf8' });
|
|
121
127
|
if (smoke.status !== 0) {
|
|
122
|
-
throw new Error(
|
|
128
|
+
throw new Error(
|
|
129
|
+
'pensieve-sdk smoke test failed after copy — the copied SDK is not runnable'
|
|
130
|
+
+ (smoke.stderr ? `: ${String(smoke.stderr).split('\n')[0]}` : ` (exit ${smoke.status})`)
|
|
131
|
+
);
|
|
123
132
|
}
|
|
124
133
|
if (log) log(`pensieve-sdk -> ${sdkBin} (self-contained copy, smoke OK)`);
|
|
125
134
|
|