Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command run twice #65

Open
liemfs opened this issue Mar 21, 2021 · 9 comments
Open

Command run twice #65

liemfs opened this issue Mar 21, 2021 · 9 comments

Comments

@liemfs
Copy link

liemfs commented Mar 21, 2021

Simple command like get help, resulting list available commands twice

List available commands:

  create:
    controller:  Generate controller
    page:  Use to generate pages
    project:  Use to generate new project
    provider:  Create a new Provider
    screen:  Generate new screen
    view:  Generate view
  generate:
    locales:  Generate translation file from json files
    model:  generate Class model from json
  help:  Show this help
  init:  generate the chosen structure on an existing project:
  install:  Use to install a package in your project (dependencies):
  remove:  Use to remove a package in your project (dependencies):
  sort:  Sort imports and format dart files
  update:  To update GET_CLI
  -version:  Shows the current CLI version'



List available commands:

  create:
    controller:  Generate controller
    page:  Use to generate pages
    project:  Use to generate new project
    provider:  Create a new Provider
    screen:  Generate new screen
    view:  Generate view
  generate:
    locales:  Generate translation file from json files
    model:  generate Class model from json
  help:  Show this help
  init:  generate the chosen structure on an existing project:
  install:  Use to install a package in your project (dependencies):
  remove:  Use to remove a package in your project (dependencies):
  sort:  Sort imports and format dart files
  update:  To update GET_CLI
  -version:  Shows the current CLI version'

The same things happen if i execute get create project, get create page, it always run twice

This is what inside get.bat

@echo off
rem This file was created by pub v2.12.2.
rem Package: get_cli
rem Version: 1.4.5
rem Executable: get
rem Script: get
if exist "C:\Users\teguh\Documents\Flutter SDK\.pub-cache\global_packages\get_cli\bin\get.dart-2.12.2.snapshot" (
  dart "C:\Users\teguh\Documents\Flutter SDK\.pub-cache\global_packages\get_cli\bin\get.dart-2.12.2.snapshot" %*
  rem The VM exits with code 253 if the snapshot version is out-of-date.
  rem If it is, we need to delete it and run "pub global" manually.
  if not errorlevel 253 (
    goto error
  )
  pub global run get_cli:get %*
) else (
  pub global run get_cli:get %*
)
goto eof
:error
exit /b %errorlevel%
:eof


@Drifeter
Copy link

did you manage to solve this?
I have the exact same problem.
everytime, every command i execute using get... ir runs twice

@liemfs
Copy link
Author

liemfs commented Apr 1, 2021

did you manage to solve this?
I have the exact same problem.
everytime, every command i execute using get... ir runs twice

Sorry for my late response. Yes, i did, but it's just temporary fix, you can delete or remark with rem command pub global run get_cli:get %* in line 14

@Drifeter
Copy link

Drifeter commented Apr 1, 2021

did you manage to solve this?
I have the exact same problem.
everytime, every command i execute using get... ir runs twice

Sorry for my late response. Yes, i did, but it's just temporary fix, you can delete or remark with rem command pub global run get_cli:get %* in line 14

Thanks, this helped.
hopefully this will be fixed in the next version

@ran-dall
Copy link

@liemfs Thanks! This was happening to me too. I had to add REM to lines 14 and 16 on both get.bat and getx.bat.

@jonataslaw
Copy link
Owner

This looks like a problem with the dart compiler for windows.
Can you confirm the operating system that this occurs?

@ran-dall
Copy link

ran-dall commented May 13, 2021

@jonataslaw Yep, it's Windows. Specifically, I'm running Microsoft Windows [Version 10.0.19042.985]. But yeah, I figured it probably had something to do with the dart compiler for Windows or something of the sort.

@liemfs
Copy link
Author

liemfs commented May 13, 2021

This looks like a problem with the dart compiler for windows.
Can you confirm the operating system that this occurs?

Yes, my machine is running Windows (v10.0.19042.985).

@maschulze
Copy link

I have the same issue, my machine is running Windows (v10.0.19043.1023).

@Levi-Lesches
Copy link

This is because of dart-lang/pub#2934. I opened dart-lang/pub#3055 to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants