Bug 450129

Summary: Path Reasonably Cannot Be Set within craftsettings.ini
Product: [Unmaintained] Craft Reporter: Richard Garber <richardgarber03>
Component: CoreAssignee: Hannah von Reth <vonreth>
Status: REPORTED ---    
Severity: normal CC: kde-windows
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Richard Garber 2022-02-13 07:35:47 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Add 'Path = ' to craftsettings.ini. If any elements of the path have spaces in them (eg. a path to something in C:\Program Files...) then the path will fail to load.
2. Attempt to start Craft (execute craftenv.ps1)

OBSERVED RESULT
Craft fails to load Path, or fails to load in general.

EXPECTED RESULT
$Env:Path is changed

SOFTWARE/OS VERSIONS
Craft: master (ABI windows-msvc2019_64-cl)
Windows: 22000.526

ADDITIONAL INFORMATION
This error occurs because the ReadINI function uses trim, which breaks on whitespace. This can be fixed by changing the environment within the powershell script, or by calling the original script from a different one, but these workarounds are clunkier than the intended configuration.
Comment 1 Richard Garber 2022-02-13 07:37:19 UTC
By Path, I meant the Path Environment Variable. I apologize for any confusion.