Skip to content

Invalid "Can not remove temporary directory" error message #4480

@nomis

Description

@nomis

Configuration

Operating system: Ubuntu 18.04

PlatformIO Version (platformio --version): 6.1.4

Description of problem

I get the following error message on every build:

Can not remove temporary directory `/.../aurora-coriolis/.pio/build`. Please remove it manually to avoid build issues

This code in platformio/run/cli.py completely ignores the exception that is generated, which has nothing to do with a build directory:

        # clean obsolete build dir
        if not disable_auto_clean:
            build_dir = config.get("platformio", "build_dir")
            try:
                clean_build_dir(build_dir, config)
            except:  # pylint: disable=bare-except
                click.secho(
                    "Can not remove temporary directory `%s`. Please remove "
                    "it manually to avoid build issues" % build_dir,
                    fg="yellow",
                )

The actual exception is:

  File "/home/simon/.local/lib/python3.7/site-packages/platformio/project/config.py", line 322, in _re_interpolation_handler
    assert parent_section.startswith("env:")

Steps to Reproduce

  1. git clone https://github.com/nomis/aurora-coriolis/
  2. cd aurora-coriolis
  3. git checkout 2a1cc02d63c7bca1eb8329e1d6f3e1f1cdd69ef8
  4. git submodule sync
  5. git submodule update --init --depth 1
  6. platformio run -e native
  7. platformio run -e native

Actual Results

Can not remove temporary directory `/.../aurora-coriolis/.pio/build`. Please remove it manually to avoid build issues

Expected Results

No request to delete the .pio/build directory.

Error message about the "invalid" configuration?

Additional info

The configuration in /platformio.ini and /src/app/pio/config.ini is complicated but it's not invalid.

The test_testing_command in the app:native_test section works correctly when used for testing environments native_test and native_test_coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions