Skip to content

OMG! My ~/Desktop was nuked! #186412

Description

@hellohuanlin

Steps to reproduce

I am following this instruction to run UIScene integration test:

https://github.com/flutter/flutter/blob/23f6f5853f50c4ee200d9f6aa0f1015b36e70e3c/dev/integration_tests/ios_add2app_uiscene/README.md

Specifically:

The test create the Flutter module, Flutter plugin, and native iOS app and deletes them at the end of the test. You can also create these files in a specific directory that will not be deleted:
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t module_uiscene_test_ios --task-args destination=[/path/to/copy/destination]

So I ran

dart bin/test_runner.dart test -t module_uiscene_test_ios --task-args destination=~/Desktop

Expected results

I was expecting the project to appear in ~/Desktop.

Actual results

It nuked my desktop. This is due to:

destinationDir.deleteSync(recursive: true);

Code sample

NA

Screenshots or Video

NA

Logs

NA

Flutter Doctor output

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions