Skip to content

Commit

Permalink
fix(cli): mud set-version --link shouldn't fetch versions (#2000)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
  • Loading branch information
R-Morpheus and holic committed Dec 4, 2023
1 parent 809905d commit 854de07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clean-bananas-hug.md
@@ -0,0 +1,5 @@
---
"@latticexyz/cli": patch
---

Using `mud set-version --link` will no longer attempt to fetch the latest version from npm.
5 changes: 4 additions & 1 deletion packages/cli/src/commands/set-version.ts
Expand Up @@ -56,8 +56,11 @@ const commandModule: CommandModule<Options, Options> = {
throw new MUDError(`These options are mutually exclusive: ${mutuallyExclusiveOptions.join(", ")}`);
}

// If the --link flag is not set, we call resolveVersion to get the version
// Resolve the version number from available options like `tag` or `commit`
options.mudVersion = await resolveVersion(options);
if (!options.link) {
options.mudVersion = await resolveVersion(options);
}

// Update all package.json below the current working directory (except in node_modules)
const packageJsons = glob.sync("**/package.json").filter((p) => !p.includes("node_modules"));
Expand Down

0 comments on commit 854de07

Please sign in to comment.