devtools
b4a0fe7c - Remove splitting by spaces from process/command helpers (#7093)

Commit
1 year ago
Remove splitting by spaces from process/command helpers (#7093) * Remove splitting by spaces from process/command helpers Accepting strings and splitting by spaces is unsafe if paths or arguments could contain spaces. Accepting strings makes it really easy to make this mistake. I propose we stop taking strings in this way and if we want to use strings for convenience we force calling `.split(' ')` at the call site (on the literal string). This makes it easier to spot these kinds of bugs... if you are calling `.split(' ')` on a string that contains a variable, you might have a bug. It's safe to call it on a simple literal string where you can easily see that it can't split incorrectly. * Always use List<String> for args
Author
Parents
  • tool/lib
    • commands
      • File
        analyze.dart
      • File
        build.dart
      • File
        fix_goldens.dart
      • File
        generate_code.dart
      • File
        pub_get.dart
      • File
        release_helper.dart
      • File
        serve.dart
      • File
        sync.dart
      • File
        update_dart_sdk_deps.dart
      • File
        update_flutter_sdk.dart
      • File
        update_perfetto.dart
    • File
      utils.dart