Repository navigation
flutter pub publish --dry-run shows a "Could not find an option named "dry-run" error #33302
Copy link
Copy link
Closed
Labels
toolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to Reproduce
- Create a package
- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
toolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
mit-mit commentedon May 24, 2019
@jonahwilliams any idea what is going on here? AFAICT we do pass the arguments to pub:
viztushar commentedon May 26, 2019
@MaikuB try
flutter pub pub publish --dry-runumutseven92 commentedon May 26, 2019
Can confirm @viztushar's solution works. Until this is fixed, Developing packages & plugins
page should be updated.
MaikuB commentedon 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 toomit-mit commentedon 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 listI'm puzzled by this. I suspect the
PackagesPassthroughCommandhas some way of telling the args parser not to error on unknown args, but I don't see it in the code.everton-e26 commentedon May 30, 2019
flutter pub publishdid not work toosolved using
flutter pub pub publishMaikuB commentedon May 30, 2019
@everton-e26 hmm interesting,
flutter pub publishworks 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 commentedon Jun 4, 2019
same issue is described here: #32307
everton-e26 commentedon Jun 12, 2019
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 52c7a1e
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
MisterJimson commentedon Jun 25, 2019
For me, both with and without
--dry-runrequires bothpub pubvegaro commentedon Jul 8, 2019
https://flutter.dev/docs/development/packages-and-plugins/developing-packages#publishing-packages
The section:
Should also say:
flutter pub pub publish. Otherwise my publish command hangs forever.huobazi commentedon Aug 1, 2019
also works for me
mit-mit commentedon Aug 1, 2019
I would be very interested in getting a set of repro steps for a case where
flutter pub publishhangs andflutter pub pub publishdoesn't. They only known case for needingpub pubis to be able to pass--dry-runMaikuB commentedon Aug 2, 2019
Hmm I just had
flutter pub publishhang for me after it list the files and tries to do an analysis. Not sure how I could provide more detailed steps. Compared to when it use to work, I'm on the latest stable (1.7.8+hotfix.4) and switched the account I use for publishing. Previously I was using a Gmail email address and now I'm using a custom email address via G Suitemit-mit commentedon Aug 13, 2019
Thanks for the error reports. I was finally able to repro this, and found a fix. Sorry about the trouble.
github-actions commentedon Aug 28, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.