docs: annotate nix path resolution
This commit is contained in:
@@ -2,6 +2,7 @@ import Foundation
|
||||
|
||||
enum ClawdisEnv {
|
||||
static func path(_ key: String) -> String? {
|
||||
// Normalize env overrides once so UI + file IO stay consistent.
|
||||
guard let value = ProcessInfo.processInfo.environment[key]?
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines),
|
||||
!value.isEmpty
|
||||
|
||||
@@ -122,6 +122,7 @@ enum DeviceModelCatalog {
|
||||
}
|
||||
|
||||
private static func locateResourceBundle() -> Bundle? {
|
||||
// Prefer module bundle (SwiftPM/tests), then main app bundle (packaged app).
|
||||
if let bundle = self.bundleIfContainsDeviceModels(Bundle.module) {
|
||||
return bundle
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ struct SettingsRootView: View {
|
||||
}
|
||||
|
||||
private var nixManagedBanner: some View {
|
||||
// Prefer gateway-resolved paths; fall back to local env defaults if disconnected.
|
||||
let snapshotPaths = GatewayConnection.shared.snapshotPaths()
|
||||
let configPath = snapshotPaths.configPath ?? ClawdisPaths.configURL.path
|
||||
let stateDir = snapshotPaths.stateDir ?? ClawdisPaths.stateDirURL.path
|
||||
|
||||
Reference in New Issue
Block a user