Bug 450129 - Path Reasonably Cannot Be Set within craftsettings.ini
Summary: Path Reasonably Cannot Be Set within craftsettings.ini
Status: REPORTED
Alias: None
Product: Craft
Classification: Unmaintained
Component: Core (show other bugs)
Version: master
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-13 07:35 UTC by Richard Garber
Modified: 2022-02-13 07:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.