Skip to content

Commit 3571315

Browse files
fix(desktop): namespace local macOS Chromium profiles
1 parent ef68416 commit 3571315

5 files changed

Lines changed: 2 additions & 14 deletions

File tree

‎apps/desktop/src/app/DesktopClerk.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ const layerDesktopClerk = (
6565
isDevelopment,
6666
appDataDirectory: "/tmp/app-data",
6767
platform,
68-
isPackaged: true,
69-
dirname: "/app",
7068
} as unknown as DesktopEnvironment.DesktopEnvironment["Service"]);
7169

7270
const electronApp = {

‎apps/desktop/src/app/DesktopConnectionCatalogStore.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ describe("DesktopConnectionCatalogStore", () => {
153153
runtimeDirectory: dirname,
154154
});
155155
assert.isString(name);
156-
const profile = path.join(environment.appDataDirectory, "local-keychains", name!);
156+
const profile = path.join(environment.appDataDirectory, name!);
157157
const tokens = path.join(stateDir, "local-keychains", name!);
158158
const legacyProfile = path.join(
159159
environment.appDataDirectory,

‎apps/desktop/src/app/DesktopPreReadyFileSystem.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const resolveWindowsUserData = (appDataDirectory: string) =>
1414
appDataDirectory,
1515
isDevelopment: false,
1616
platform: "win32",
17-
isPackaged: true,
18-
dirname: "/app",
1917
}).pipe(Effect.provide(DesktopPreReadyFileSystem.layer));
2018

2119
it.layer(NodeServices.layer)("DesktopPreReadyFileSystem", (it) => {

‎apps/desktop/src/app/DesktopUserData.test.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ it.effect("identifies a failed source read and preserves its cause", () => {
2020
appDataDirectory: "/profiles",
2121
isDevelopment: false,
2222
platform: "win32",
23-
isPackaged: true,
24-
dirname: "/app",
2523
}).pipe(Effect.flip);
2624
assert.equal(error.operation, "read");
2725
assert.equal(error.resourcePath, sourceState);
@@ -57,8 +55,6 @@ it.effect.each(["t3code", "T3 Code (Alpha)"])(
5755
appDataDirectory: directory,
5856
isDevelopment: false,
5957
platform: "win32",
60-
isPackaged: true,
61-
dirname: "/app",
6258
});
6359
assert.equal(yield* fs.readFileString(path.join(destination, "Local State")), state);
6460
assert.equal(yield* fs.readFileString(path.join(source, "Local State")), state);
@@ -68,8 +64,6 @@ it.effect.each(["t3code", "T3 Code (Alpha)"])(
6864
appDataDirectory: directory,
6965
isDevelopment: false,
7066
platform: "win32",
71-
isPackaged: true,
72-
dirname: "/app",
7367
});
7468
assert.equal(
7569
yield* fs.readFileString(path.join(destination, "Local State")),

‎apps/desktop/src/app/DesktopUserData.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ export const resolveUserDataPath = Effect.fn("desktop.userData.resolveUserDataPa
3636
readonly appDataDirectory: string;
3737
readonly isDevelopment: boolean;
3838
readonly platform: NodeJS.Platform;
39-
readonly isPackaged: boolean;
40-
readonly dirname: string;
4139
readonly localMacKeychainName?: string | undefined;
4240
}) {
4341
const fs = yield* FileSystem.FileSystem;
4442
const path = yield* Path.Path;
4543
if (input.localMacKeychainName !== undefined) {
4644
// Chromium cookies must use the same runtime boundary as their Keychain key.
47-
return path.join(input.appDataDirectory, "local-keychains", input.localMacKeychainName);
45+
return path.join(input.appDataDirectory, input.localMacKeychainName);
4846
}
4947
const names = input.isDevelopment
5048
? { current: "t3code-dev", legacy: "T3 Code (Dev)" }

0 commit comments

Comments
 (0)