@dotenc/cli 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +17 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ var package_default;
7
7
  var init_package = __esm(() => {
8
8
  package_default = {
9
9
  name: "@dotenc/cli",
10
- version: "0.6.0",
10
+ version: "0.6.1",
11
11
  description: "🔐 Git-native encrypted environments powered by your SSH keys",
12
12
  author: "Ivan Filho <i@ivanfilho.com>",
13
13
  license: "MIT",
@@ -2749,7 +2749,7 @@ var runPackageManagerCommand = (command, args, spawnImpl = spawn3) => new Promis
2749
2749
  if (method === "unknown") {
2750
2750
  deps.log("Could not determine installation method automatically.");
2751
2751
  deps.log(`Try one of these commands:`);
2752
- deps.log(` ${chalk18.gray("brew upgrade dotenc")}`);
2752
+ deps.log(` ${chalk18.gray("brew update && brew upgrade dotenc")}`);
2753
2753
  deps.log(` ${chalk18.gray("scoop update dotenc")}`);
2754
2754
  deps.log(` ${chalk18.gray("npm install -g @dotenc/cli")}`);
2755
2755
  deps.log(`Or download from ${chalk18.cyan(GITHUB_RELEASES_URL)}.`);
@@ -2757,6 +2757,21 @@ var runPackageManagerCommand = (command, args, spawnImpl = spawn3) => new Promis
2757
2757
  }
2758
2758
  const updater = updateCommands[method];
2759
2759
  deps.log(`Updating dotenc via ${updater.label}...`);
2760
+ if (method === "homebrew") {
2761
+ try {
2762
+ const brewUpdateCode = await deps.runPackageManagerCommand("brew", [
2763
+ "update"
2764
+ ]);
2765
+ if (brewUpdateCode !== 0) {
2766
+ deps.logError(`${chalk18.red("Error:")} update command exited with code ${brewUpdateCode}.`);
2767
+ deps.exit(brewUpdateCode);
2768
+ }
2769
+ } catch (error) {
2770
+ deps.logError(`${chalk18.red("Error:")} failed to run ${chalk18.gray("brew update")}.`);
2771
+ deps.logError(`${chalk18.red("Details:")} ${error instanceof Error ? error.message : String(error)}`);
2772
+ deps.exit(1);
2773
+ }
2774
+ }
2760
2775
  let exitCode = 0;
2761
2776
  try {
2762
2777
  exitCode = await deps.runPackageManagerCommand(updater.command, updater.args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotenc/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "🔐 Git-native encrypted environments powered by your SSH keys",
5
5
  "author": "Ivan Filho <i@ivanfilho.com>",
6
6
  "license": "MIT",