Flutterando / slidy

CLI package manager and template for Flutter
https://pub.dev/packages/slidy
Apache License 2.0
806 stars 101 forks source link

Cmd commands invoked twice #246

Closed rogasciences closed 3 years ago

rogasciences commented 3 years ago

image

When trying to invoke a command over the terminal in VS Code, slidy commands run twice, making it impossible to work with.

Has anyone encountered that problem?

environment: sdk: ">=2.12.0 <3.0.0"

`[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19042.867], locale en-US) • Flutter version 2.0.3 at D:\SDKs\flutternullsafe\flutter • Framework revision 4d7946a68d (2 weeks ago), 2021-03-18 17:24:33 -0700 • Engine revision 3459eb2436 • Dart version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at C:\Users\roini\AppData\Local\Android\sdk • Platform android-30, build-tools 29.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 49.0.1 • Dart plugin version 192.8052 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.55.0) • VS Code at C:\Users\roini\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.16.0

[√] Connected device (2 available) • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90 • Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.63

• No issues found`

izziizzi commented 3 years ago

in the windows file C:\Users\YOURNAMEUSER\AppData\Local\Pub\Cache\bin\slidy.bat delete line 14 "pub global run slidy: main% *"

it worked for me :-)

jacobaraujo7 commented 3 years ago

Check the new version 3.1.0. :)

KillerBean commented 3 years ago

Check the new version 3.1.0. :)

The same behaviour as version 3.0.2

roy-xr commented 3 years ago

@jacobaraujo7 Still happening with the new version as well as after applying @izziizzi fix.

I guess something is wrong with my path setup or so. will check further

rogasciences commented 3 years ago

Well I've made some progress image now it invokes once but says 'pub' is not recognized as an internal or external command, operable program or batch file.

The cause of that is being forced to add AppData\Roaming\Pub\Cache\bin to the path variables - Which along with having C:\src\flutter\bin\cache\dart-sdk\bin in the path caused the double invocation of the commands .

I solved this by removing C:\src\flutter\bin\cache\dart-sdk\bin from he path.

Is any other solution possible? (as it forces me to use "flutter pub" for using dart commands)

Thanks @jacobaraujo7

andrewbiller commented 3 years ago

in the windows file C:\Users\YOURNAMEUSER\AppData\Local\Pub\Cache\bin\slidy.bat delete line 14 "pub global run slidy: main% *"

it worked for me :-)

This is the only solution so far for windows (3.2.0). PATH contains both lines:

flutter\bin\cache\dart-sdk\bin
AppData\Roaming\Pub\Cache\bin
rogasciences commented 3 years ago

Atm only @izziizzi Solution seems to work. Fine for now :)

KillerBean commented 3 years ago

Version 3.2.1+1 same thing

jacobaraujo7 commented 3 years ago

It is a Powershell problem. Use CMD for this

MateusPedrosoSilva commented 2 years ago

in the windows file C:\Users\YOURNAMEUSER\AppData\Local\Pub\Cache\bin\slidy.bat delete line 14 "pub global run slidy: main% *" it worked for me :-)

This is the only solution so far for windows (3.2.0). PATH contains both lines:

flutter\bin\cache\dart-sdk\bin
AppData\Roaming\Pub\Cache\bin

in the windows file C:\Users\YOURNAMEUSER\AppData\Local\Pub\Cache\bin\slidy.bat delete line 14 "pub global run slidy: main% *"

it worked for me :-)

For me it worked!!