thinkwork-cli 0.5.3 → 0.5.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/dist/cli.js +7 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2026,6 +2026,7 @@ function registerToolsCommand(program2) {
|
|
|
2026
2026
|
|
|
2027
2027
|
// src/commands/update.ts
|
|
2028
2028
|
import { execSync as execSync9 } from "child_process";
|
|
2029
|
+
import { realpathSync } from "fs";
|
|
2029
2030
|
import chalk9 from "chalk";
|
|
2030
2031
|
function getLatestVersion() {
|
|
2031
2032
|
try {
|
|
@@ -2045,8 +2046,12 @@ function detectInstallMethod() {
|
|
|
2045
2046
|
timeout: 5e3,
|
|
2046
2047
|
stdio: ["pipe", "pipe", "pipe"]
|
|
2047
2048
|
}).trim();
|
|
2048
|
-
|
|
2049
|
-
|
|
2049
|
+
let resolved = which;
|
|
2050
|
+
try {
|
|
2051
|
+
resolved = realpathSync(which);
|
|
2052
|
+
} catch {
|
|
2053
|
+
}
|
|
2054
|
+
if (resolved.includes("/Cellar/")) return "homebrew";
|
|
2050
2055
|
return "npm";
|
|
2051
2056
|
} catch {
|
|
2052
2057
|
return "npm";
|