mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
some redundant comments
This commit is contained in:
@@ -1086,7 +1086,6 @@ fn find_workspace_or_exe_root() -> Option<PathBuf> {
|
||||
}
|
||||
|
||||
pub fn load_init_config_from_workspace() -> Result<Mapping, ConfigError> {
|
||||
// Check for distro-provided init config first
|
||||
if let Ok(init_config_path) = std::env::var("GOOSE_INIT_CONFIG") {
|
||||
let path = PathBuf::from(&init_config_path);
|
||||
if path.exists() {
|
||||
@@ -1095,7 +1094,6 @@ pub fn load_init_config_from_workspace() -> Result<Mapping, ConfigError> {
|
||||
}
|
||||
}
|
||||
|
||||
// Fall through to existing workspace root logic
|
||||
let root = find_workspace_or_exe_root().ok_or_else(|| {
|
||||
ConfigError::FileError(std::io::Error::new(
|
||||
std::io::ErrorKind::NotFound,
|
||||
|
||||
@@ -57,7 +57,6 @@ export default function AnnouncementModal() {
|
||||
}
|
||||
|
||||
try {
|
||||
// Try distro announcements first, then fall back to bundled
|
||||
let announcements: AnnouncementMeta[];
|
||||
try {
|
||||
const distroAnnouncements = await window.electron.getDistroAnnouncements();
|
||||
|
||||
@@ -32,7 +32,7 @@ async function loadBundledExtensions(): Promise<BundledExtension[]> {
|
||||
return distroExtensions;
|
||||
}
|
||||
} catch {
|
||||
// Fall through to default
|
||||
// use default
|
||||
}
|
||||
return defaultBundledExtensionsData as BundledExtension[];
|
||||
}
|
||||
@@ -75,7 +75,6 @@ export async function syncBundledExtensions(
|
||||
addExtensionFn: (name: string, config: ExtensionConfig, enabled: boolean) => Promise<void>
|
||||
): Promise<void> {
|
||||
try {
|
||||
// Load bundled extensions (may be overridden by distro overlay)
|
||||
const bundledExtensions = await loadBundledExtensions();
|
||||
|
||||
// Process each bundled extension
|
||||
|
||||
@@ -11,13 +11,11 @@ let distroDir: string | null = null;
|
||||
let distroConfig: DistroConfig = {};
|
||||
|
||||
function findDistroDir(): string | null {
|
||||
// 1. Check external path (no re-signing needed)
|
||||
const externalPath = path.join(app.getPath('userData'), 'distro');
|
||||
if (fs.existsSync(path.join(externalPath, 'distro.json'))) {
|
||||
return externalPath;
|
||||
}
|
||||
|
||||
// 2. Check in-bundle path
|
||||
const bundlePath = path.join(process.resourcesPath, 'distro');
|
||||
if (fs.existsSync(path.join(bundlePath, 'distro.json'))) {
|
||||
return bundlePath;
|
||||
@@ -32,7 +30,6 @@ if (distroDir) {
|
||||
const configPath = path.join(distroDir, 'distro.json');
|
||||
distroConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
||||
|
||||
// Apply env var overrides immediately
|
||||
if (distroConfig.env) {
|
||||
for (const [key, value] of Object.entries(distroConfig.env)) {
|
||||
process.env[key] = value;
|
||||
|
||||
@@ -257,7 +257,6 @@ export const startGoosed = async (options: StartGoosedOptions): Promise<GoosedRe
|
||||
}
|
||||
}
|
||||
|
||||
// Pass distro init-config path to goosed if available
|
||||
const initConfigPath = getDistroFilePath('init-config.yaml');
|
||||
if (initConfigPath) {
|
||||
spawnEnv.GOOSE_INIT_CONFIG = initConfigPath;
|
||||
|
||||
@@ -183,7 +183,6 @@ type ElectronAPI = {
|
||||
refreshApp: (app: GooseApp) => Promise<void>;
|
||||
closeApp: (appName: string) => Promise<void>;
|
||||
addRecentDir: (dir: string) => Promise<boolean>;
|
||||
// Distro overlay functions
|
||||
getDistroBundledExtensions: () => Promise<unknown[] | null>;
|
||||
getDistroAnnouncements: () => Promise<unknown[] | null>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user