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

fix(shorebird_cli): remove lookup of nonexistent argument #545

Merged
merged 1 commit into from
May 25, 2023

Conversation

bryanoltman
Copy link
Contributor

@bryanoltman bryanoltman commented May 25, 2023

Description

Fixes a crash when running shorebird release android:

$ shorebird release android
✓ Building release (4.9s)
✓ Fetching apps (0.2s)
✓ Detecting release version (0.4s)
Unhandled exception:
Invalid argument(s): Could not find an option named "platform".
#0      ArgResults.[] (package:args/src/arg_results.dart:65:7)
#1      ReleaseAndroidCommand.run (package:shorebird_cli/src/commands/release/release_android_command.dart:147:29)
<asynchronous suspension>
#2      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#3      ShorebirdCliCommandRunner.runCommand (package:shorebird_cli/src/command_runner.dart:132:18)
<asynchronous suspension>
#4      ShorebirdCliCommandRunner.run (package:shorebird_cli/src/command_runner.dart:93:14)
<asynchronous suspension>
#5      main (file:///C:/Users/bryan/Documents/shorebirdtech/_shorebird/shorebird/packages/shorebird_cli/bin/shorebird.dart:6:24)
<asynchronous suspension>

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@bryanoltman bryanoltman requested a review from felangel May 25, 2023 01:58
@@ -144,7 +144,7 @@ Did you forget to run "shorebird init"?''',
return ExitCode.software.code;
}

final platform = results['platform'] as String;
const platform = 'android';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixing this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shorebird release command is also not working as-is - it seems like commands with subcommands "branch" commands and can't be run themselves (see https://pub.dev/documentation/args/latest/command_runner/Command-class.html). Seems like we may need to deprecate shorebird release sooner than we thought 🙃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I thought it was still possible 🤔

Will look into it in a few mins

@felangel felangel merged commit c4dd10b into main May 25, 2023
@felangel felangel deleted the bo/fix-release branch May 25, 2023 02:02
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

Successfully merging this pull request may close these issues.

2 participants