PlatformIO IDE 'platformio init' runs build scripts

It looks like this method (looking for “idedata” inside of COMMAND_LINE_TARGETS doesn’t work in the latest version of the IDE (PIO 5.2.1 / Home 3.3.4). Is there some better (i.e., formally supported) method now for checking whether platformio init is currently executing so that scripts can bail in that case?