leoafarias / fvm

Flutter Version Management: A simple CLI to manage Flutter SDK versions.
https://fvm.app
MIT License
4.71k stars 230 forks source link

[BUG] Unable to change the `context.flutterUrl` #584

Open oravecz opened 11 months ago

oravecz commented 11 months ago

Describe the bug Based on code commits and review of the source code, I am expecting that I can change the location of the remote used for the git clone operation.

I didn't find mention of this capability in the documentation.

To Reproduce

  1. I have set my environment variable, with no success export FVM_FLUTTER_URL=<remote>
  2. I have attempted to set flutter_url using the fvm config command to no avail
  3. I have attempted to pass the url as a command line parameter (out of desperation) fvm --flutter_url <remote>

Expected behavior Would like the documentation regarding the use of the FVM_FLUTTER_URL flag.

Ideally, I would like to see the Flutter version of this property (FLUTTER_GIT_URL) be used instead of (or as the backup for) the FVM_FLUTTER_URL env variable.

How to set this value in the configuration would also be helpful.

leoafarias commented 11 months ago

@oravecz after reviewing this, are you using version 3.0 beta? I tested case 1 and it seems to work correctly. After setting the value you can run fvm doctor and will output if a value is detected.

oravecz commented 11 months ago

It was my fault, as I was looking at the 3.0.x source code, but using 2.x on my side.

I would like to see FVM default to using the FLUTTER_GIT_URL being used by Flutter for the same purpose - location of a fork of https://github.com/flutter/flutter. The override is nice to provide users, but if using FLUTTER_GIT_URL as the FVM default when it is present is even better, since if one is in use - chances are both need to be set.