buildwithtrace 0.1.3 → 0.1.4
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/buildwithtrace.js +9 -1
- package/install.js +8 -0
- package/package.json +1 -1
package/bin/buildwithtrace.js
CHANGED
|
@@ -33,7 +33,15 @@ function run() {
|
|
|
33
33
|
process.exit(result.status ?? 1);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// Fallback: try system-installed buildwithtrace
|
|
36
|
+
// Fallback: try system-installed buildwithtrace. Say so out loud (stderr,
|
|
37
|
+
// one line) — the system copy may be a DIFFERENT version than this npm
|
|
38
|
+
// package pins, and a silent swap is exactly the confusion doctor warns about.
|
|
39
|
+
const pkgVersion = require("../package.json").version;
|
|
40
|
+
console.error(
|
|
41
|
+
`[buildwithtrace] npm-managed venv not found; falling back to the system ` +
|
|
42
|
+
`'buildwithtrace' on PATH (may differ from the npm package v${pkgVersion}). ` +
|
|
43
|
+
`Run \`npm rebuild -g buildwithtrace\` to repair the venv.`
|
|
44
|
+
);
|
|
37
45
|
const cmd = process.platform === "win32" ? "buildwithtrace.exe" : "buildwithtrace";
|
|
38
46
|
const result = spawnSync(cmd, args, {
|
|
39
47
|
stdio: "inherit",
|
package/install.js
CHANGED
|
@@ -151,6 +151,14 @@ async function main() {
|
|
|
151
151
|
process.exit(0);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
// Stamp the install origin so `buildwithtrace --version` / `doctor` label
|
|
155
|
+
// this copy "(npm)" even if the venv lives at a non-default cache path.
|
|
156
|
+
try {
|
|
157
|
+
fs.writeFileSync(path.join(VENV_DIR, "trace-install-origin"), "npm\n");
|
|
158
|
+
} catch {
|
|
159
|
+
// Best-effort: the path heuristic still recognizes the default location.
|
|
160
|
+
}
|
|
161
|
+
|
|
154
162
|
log("Installation complete! Run `buildwithtrace --help` to get started.");
|
|
155
163
|
}
|
|
156
164
|
|
package/package.json
CHANGED