@tankpkg/cli 0.16.1 → 0.16.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/dist/bin/tank.js +10 -3
- package/dist/bin/tank.js.map +1 -1
- package/dist/{debug-logger-BDCjX9M-.js → debug-logger-Ds5BG5rk.js} +2 -2
- package/dist/{debug-logger-BDCjX9M-.js.map → debug-logger-Ds5BG5rk.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/tank.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as VERSION, i as USER_AGENT, l as setConfig, n as flushLogs, o as getConfig, s as getConfigDir, t as authFlowLog } from "../debug-logger-
|
|
2
|
+
import { a as VERSION, i as USER_AGENT, l as setConfig, n as flushLogs, o as getConfig, s as getConfigDir, t as authFlowLog } from "../debug-logger-Ds5BG5rk.js";
|
|
3
3
|
import { t as logger } from "../logger-BhULz3Uz.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { Command } from "commander";
|
|
@@ -11915,6 +11915,14 @@ function resolveCurrentBinary() {
|
|
|
11915
11915
|
return process.execPath;
|
|
11916
11916
|
}
|
|
11917
11917
|
}
|
|
11918
|
+
function replaceBinary(tmpBin, currentBinaryPath) {
|
|
11919
|
+
if (process.platform !== "win32") {
|
|
11920
|
+
fs.renameSync(tmpBin, currentBinaryPath);
|
|
11921
|
+
fs.chmodSync(currentBinaryPath, 493);
|
|
11922
|
+
return;
|
|
11923
|
+
}
|
|
11924
|
+
fs.copyFileSync(tmpBin, currentBinaryPath);
|
|
11925
|
+
}
|
|
11918
11926
|
async function upgradeCommand(opts) {
|
|
11919
11927
|
const currentBinaryPath = resolveCurrentBinary();
|
|
11920
11928
|
if (process.platform !== "win32" && (currentBinaryPath.includes("/Cellar/") || currentBinaryPath.includes("/homebrew/"))) {
|
|
@@ -11972,8 +11980,7 @@ async function upgradeCommand(opts) {
|
|
|
11972
11980
|
return;
|
|
11973
11981
|
}
|
|
11974
11982
|
if (process.platform !== "win32") fs.chmodSync(tmpBin, 493);
|
|
11975
|
-
|
|
11976
|
-
if (process.platform !== "win32") fs.chmodSync(currentBinaryPath, 493);
|
|
11983
|
+
replaceBinary(tmpBin, currentBinaryPath);
|
|
11977
11984
|
console.log(chalk.green(`✓ Upgraded tank ${VERSION} → ${targetVersion}`));
|
|
11978
11985
|
console.log(chalk.gray(`Release notes: https://github.com/tankpkg/tank/releases/tag/v${targetVersion}`));
|
|
11979
11986
|
} finally {
|