Can't save exporters via Projucer CLI

I’m receiving this Projucer CLI error when attempting to “–resave”

C:\Aaron\Projects\GitHub\APU\plugins\LoudnessCompressor>c:\Aaron\3rd-party\JUCE-7.0.6\Projucer.exe --resave "APU Loudness Compressor.jucer"
Error when saving: At least one of your JUCE module paths is invalid!
Please ensure each module path points to the correct JUCE modules folder.

There are no errors when saving/exporting the same .jucer from the Projucer user interface.

I’m assuming the error relates to using environment variables as module paths, but for some reason it only has a problem with them when attempting to use the CLI interface. Here’s a screenshot of how the modules are generally configured for this .jucer project:

image

For anyone who finds this thread in the future, I was able to fix this by forking JUCE and making a very simple modification to jucer_CommandLine.cpp. I’ve simply removed the check for these two booleans, and always call the associated functions. This resolves the Projucer error when running --resave on modules which aren’t configured to use global paths.

            if (scanJUCEPath)
                ProjucerApplication::getApp().rescanJUCEPathModules();

            if (scanUserPaths)
                ProjucerApplication::getApp().rescanUserPathModules();