Skip to content

Commit

Permalink
Fix login on Linux (#43)
Browse files Browse the repository at this point in the history
* add log

* add fix
  • Loading branch information
Flaque authored Nov 28, 2024
1 parent 297e24f commit f5b6586
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/helpers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ const ConfigDefaults = process.env.IS_DEVELOPMENT_CLI_ENV
// --

export async function saveConfig(
config: Partial<Config>,
config: Partial<Config>
): Promise<{ success: boolean }> {
const configPath = getConfigPath();
const configDir = join(homedir(), ".sfcompute");
const configData = JSON.stringify(config, null, 2);

try {
// Ensure config directory exists
await Deno.mkdir(configDir, { recursive: true });
await Deno.writeTextFile(configPath, configData);

return { success: true };
} catch (error) {
console.error("Error saving config:", error);
return { success: false };
}
}
Expand Down

0 comments on commit f5b6586

Please sign in to comment.