Skip to content

Commit

Permalink
fix(core): change remoteCache to be a function call
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli committed Aug 28, 2024
1 parent 13170da commit 50ef9f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/nx/src/nx-cloud/update-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface NxCloudClient {
configureLightClientRequire: () => (paths: string[]) => void;
commands: Record<string, () => Promise<void>>;
nxCloudTasksRunner: TasksRunner<CloudTaskRunnerOptions>;
remoteCache: RemoteCacheV2;
getRemoteCache: () => RemoteCacheV2;
}
export async function verifyOrUpdateNxCloudClient(
options: CloudTaskRunnerOptions
Expand Down
4 changes: 2 additions & 2 deletions packages/nx/src/tasks-runner/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export class DbCache {
if (isNxCloudUsed(nxJson)) {
const options = getCloudOptions();
const { nxCloudClient } = await verifyOrUpdateNxCloudClient(options);
if (nxCloudClient.remoteCache) {
return nxCloudClient.remoteCache;
if (nxCloudClient.getRemoteCache) {
return nxCloudClient.getRemoteCache();
} else {
// old nx cloud instance
return await RemoteCacheV2.fromCacheV1(this.options.nxCloudRemoteCache);
Expand Down

0 comments on commit 50ef9f4

Please sign in to comment.