fvm icon indicating copy to clipboard operation
fvm copied to clipboard

[Enhancement] Show warning when git not installed

Open listepo opened this issue 1 year ago • 8 comments

Before creating a bug report please make check the following

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to terminal..
  2. Install choco
  3. Install fvm
  4. See error

Creating local mirror...

✓ Clone complete
✗ Failed to ensure FlutterVersion(name: stable, releaseFromChannel: null, type: VersionType.channel) is cached.

Exception: Git clone failed

package:fvm/src/utils/parsers/git_clone_update_printer.dart 92   runGitCloneUpdate
package:fvm/src/services/flutter_service.dart 146                FlutterService.updateLocalMirror
package:fvm/src/workflows/ensure_cache.workflow.dart 85          ensureCacheWorkflow
package:fvm/src/commands/install_command.dart 75                 InstallCommand.run
package:args/command_runner.dart 212                             CommandRunner.runCommand
package:fvm/src/runner.dart 246                                  FvmCommandRunner.runCommand
package:fvm/src/runner.dart 122                                  FvmCommandRunner.run
package:scope/src/scope.dart 151                                 Scope.run
c:\programdata\chocolatey\lib\fvm\tools\source\bin\main.dart 13  main

Desktop (please complete the following information):

  • OS: [Windows 11]
  • FVM Version [e.g. 22]
  • If Windows: Which Powershell are you using?
  • Yes

Additional context Add any other context about the problem here.

listepo avatar Apr 15 '24 18:04 listepo

@listepo can you share the version of FVM, I believe this has been fixed in one of the latest versions.

leoafarias avatar Apr 16 '24 12:04 leoafarias

I try install latest version

listepo avatar Apr 16 '24 13:04 listepo

@leoafarias fvm --version 3.1.3

listepo avatar Apr 16 '24 18:04 listepo

I found the problem, I didn't have git installed. I think you need to check and display a clear error. cc @leoafarias

listepo avatar Apr 16 '24 19:04 listepo

@listepo, I'm also encountering this issue. I've verified that I have Git installed. Any insights would be appreciated.

Ay0ubCheurfi avatar Apr 17 '24 10:04 Ay0ubCheurfi

@leoafarias, I'm getting this error despite using FVM v3.1.3, which I believe is the latest version. Any ideas what might be causing this?

Ay0ubCheurfi avatar Apr 17 '24 10:04 Ay0ubCheurfi

@Ay0ubCheurfi Can you create a directory and run git clone https://github.com/flutter/flutter.git to see if there is an issue on git?

leoafarias avatar Apr 17 '24 13:04 leoafarias

@listepo Just an update – the issue wasn't reflected correctly in the error message "Exception: Git clone failed". It was my internet connection. Switching networks fixed it.

Ay0ubCheurfi avatar Apr 17 '24 13:04 Ay0ubCheurfi