Skip to content

Conversation

@gnprice
Copy link
Member

@gnprice gnprice commented Feb 26, 2023

Fixes #121467.

If flutter config receives any positional arguments, then something is wrong; one way or another, the command isn't what the developer intended. Give an error and let the developer fix the command, rather than silently doing the wrong thing.

The most likely cause of this error is that the developer intended to pass a path that has spaces in it, and the shell split the path into several arguments at the spaces. This has produced a couple of reports in the tracker. So give a hint aimed at this possibility.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Fixes flutter#121467.

If `flutter config` receives any positional arguments, then
something is wrong; one way or another, the command isn't what
the developer intended.  Give an error and let the developer
fix the command, rather than silently doing the wrong thing.

The most likely cause of this error is that the developer intended
to pass a path that has spaces in it, and the shell split the path
into several arguments at the spaces.  This has produced a couple of
reports in the tracker.  So give a hint aimed at this possibility.
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 26, 2023
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

nice fix, thanks!

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 27, 2023
@auto-submit auto-submit bot merged commit 516b60b into flutter:master Feb 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2023
@gnprice gnprice deleted the pr-config-args branch February 27, 2023 18:08
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter config silently accepts excess arguments caused by shell word splitting

3 participants