Data_dir per environment

Should data_dir work per environment? It feels like that would be useful to e.g. load different config files onto each device. I think it was working previously, but now it doesn’t seem to - Ignore unknown configuration option data_dir in section [env] - so perhaps I remember wrong?

data_dir is only settable globally per-project (docs).

Maybe a script can dynamically change env.Replace(PROJECT_DATA_DIR = env.subst("data_dir_$PIOENV"))?