Open halfnibble opened 5 years ago
Here's one more issue:
If you run rush init --overwrite-existing
in an existing Rush folder, it will use the version from rush.json even if a newer version is installed globally. The main point of that feature is for upgrading a repo, so the behavior is super annoying and certainly a bug.
So I'd propose the following
rush init
prints an error (not warning) if it's not the latest Rush. npm install -g @microsoft/rush
if they want the latest version.--skip-version-check
) that suppresses the rush init
error.DS_Store
to .gitignore in the rush init template. 👍 rush init
should bypass the version selector and use the globally installed Rush. This is slightly tricky because you have to safely parse the init
token in rush/src/start.ts. But it is the right thing to do. (Ping me on Gitter for help with this.)In this Gitter conversation we discussed introducing a new binary myrush
that invokes your globally installed Rush version (bypassing the version selector that would normally invoke the version specified in rush.json
).
With this feature, you could use myrush init --overwrite-existing
to upgrade a repo to your locally installed version of Rush.
Issue https://github.com/microsoft/rushstack/issues/1073 pointed out that the error message The "rush init" command must be run in a new folder without an existing Rush configuration.
could be more helpful -- in its current form it's not obvious to users how they are supposed to upgrade their repo. We should tackle these problems together.
I apologize for the lack of progress on PR https://github.com/microsoft/rushstack/pull/1771. I'll see if I can make some time to push it along. This is a core user scenario we're trying to improve, and (hopefully) a relatively easy fix.
Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.
Is this a feature or a bug?
Please describe the actual behavior. Running
rush init
will create a rush.json file with presently installed version of rush and pnpm version 2.15.1.If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.
rush init
What is the expected behavior? Should this create a new rush project with the latest available version of rush? Or does it make sense to use the currently installed version?
Also, should we update this template to use a newer version on pnpm?
After further discussion, we should do the following:
rush init
is not the latest version..DS_Store
to .gitignore in the rush init template.