NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

[Feature request] Prevent ns doctor from re-installing packages/modules already installed #5446

Open fossette opened 3 years ago

fossette commented 3 years ago

Environment

With such a result from ns doctor :

✔ Getting environment information 

There seem to be issues with your configuration.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.0.11 version and is up to date.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods update is not required.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.2.0 satisfies minimum required version 10.
✖ WARNING: CocoaPods is not installed or is not configured properly. 
 You will not be able to build your projects for iOS if they contain plugin with CocoaPod file.
To be able to build such projects, verify that you have installed CocoaPods (`sudo gem install cocoapods`). 

It would be appreciated for successfully installed packages/modules to not be re-installed again. At worst, to offer the user a possibility to select NO on an individual basis. Re-installing sometimes is a huge burden on a limited bandwidth Internet connection, and it also wastes a huge amount of time.

sr3dna commented 3 years ago

@fossette, I am also using ns 7.0.11. When I run 'ns doctor' again, it does ask me whether I want to proceed before each step though. E.g.
Do you have Xcode installed? (y/n) Allow the script to install Homebrew? (Y)es/(N)o Allow the script to install Google Chrome? (Y)es/(N)o.... etc.

So I can respond with a 'N' to skip any step that I don't need to reinstall. Not sure why your experience is different though.

fossette commented 3 years ago

I also experimented with Yes/No module installs, @sr3dna , but what I meant to say is why ask to install these packages, that you mention as an example, when they are already installed and up to date? It's not necessary, and confusing to a point.

fossette commented 3 years ago

Also, I seem to recall having said NO to a re-install option, and the process seemed to "install" something. I can't give a specific example at this time because I addressed the CocoaPods warning after creating this feature request.

sr3dna commented 3 years ago

I see. My guess is, the NS team wants to give us a chance to 'reinstall' any step if we want to. I agree though, the message could be more elaborate to avoid any confusion.