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

flutter pub publish --dry-run shows a "Could not find an option named "dry-run" error #33302

Open
MaikuB opened this issue May 24, 2019 · 9 comments

Comments

Projects
None yet
7 participants
@MaikuB
Copy link

commented May 24, 2019

Steps to Reproduce

  1. Create a package
  2. Execute flutter pub publish --dry-run

Logs

Could not find an option named "dry-run".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-AU)
    • Flutter version 1.5.4-hotfix.2 at /Users/michaelbui/flutter
    • Framework revision 7a4c33425d (4 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/michaelbui/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/michaelbui/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.3.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 23.0.2
    • Dart plugin version 173.4700

[✓] VS Code (version 1.34.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.0.2

[!] Connected device
    ! No devices available
@mit-mit

This comment has been minimized.

Copy link
Member

commented May 24, 2019

@jonahwilliams any idea what is going on here? AFAICT we do pass the arguments to pub:

  Future<FlutterCommandResult> runCommand() async {
    await pub(<String>[_commandName]..addAll(argResults.rest), context: PubContext.pubForward, retry: false);
    return null;
  }

@mit-mit mit-mit added the tool label May 24, 2019

@jonahwilliams jonahwilliams self-assigned this May 24, 2019

@viztushar

This comment has been minimized.

Copy link

commented May 26, 2019

@MaikuB try flutter pub pub publish --dry-run

@umutseven92

This comment has been minimized.

Copy link

commented May 26, 2019

Can confirm @viztushar's solution works. Until this is fixed, Developing packages & plugins
page should be updated.

@MaikuB

This comment has been minimized.

Copy link
Author

commented May 27, 2019

@viztushar Thanks. I've already been using the "old" command flutter packages pub publish --dry-run. This issue was created more to track that what's in the updated documentation doesn't work so the tooling can be updated and potentially have docs can be updated too

@mit-mit

This comment has been minimized.

Copy link
Member

commented May 28, 2019

@jonahwilliams another repro for this (which doesn't risk running a publish command):

(works): flutter pub pub deps --style list
(doesn't work): flutter pub deps --style list

I'm puzzled by this. I suspect the PackagesPassthroughCommand has some way of telling the args parser not to error on unknown args, but I don't see it in the code.

@everton-e26

This comment has been minimized.

Copy link

commented May 30, 2019

flutter pub publish did not work too

solved using
flutter pub pub publish

@MaikuB

This comment has been minimized.

Copy link
Author

commented May 30, 2019

@everton-e26 hmm interesting, flutter pub publish works for me. it's just the dry-run option that doesn't. i'm on the stable channel (v1.5.4-hotfix.2). i assume you're on the same version?

@d-wolf

This comment has been minimized.

Copy link

commented Jun 4, 2019

flutter pub publish did not work too

solved using
flutter pub pub publish

same issue is described here: #32307

@everton-e26

This comment has been minimized.

Copy link

commented Jun 12, 2019

@everton-e26 hmm interesting, flutter pub publish works for me. it's just the dry-run option that doesn't. i'm on the stable channel (v1.5.4-hotfix.2). i assume you're on the same version?

yes! same

Flutter 1.5.4-hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7a4c334 (6 weeks ago) • 2019-04-29 11:05:24 -0700
Engine • revision 52c7a1e849
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.