Extend possible paths for SettingsPresets (#1135)

* Search for presets in Bundle.main.resourcesPath dir (if exists)
This commit is contained in:
SofteqDG
2022-10-01 11:23:09 +03:00
committed by GitHub
parent ed5ec74668
commit 435c19443a
@@ -193,6 +193,10 @@ extension SettingsPresetFile {
Path(#file).parent().parent().parent() + relativePath,
]
if let resourcePath = Bundle.main.resourcePath {
possibleSettingsPaths.append(Path(resourcePath) + relativePath)
}
if let symlink = try? (bundlePath + "xcodegen").symlinkDestination() {
possibleSettingsPaths = [
symlink.parent() + relativePath,