Skip to content

Commit

Permalink
Merge pull request #4237 from jandubois/fix-win-profiles
Browse files Browse the repository at this point in the history
The Linux paths should be set only when running on Linux.
  • Loading branch information
jandubois authored Mar 20, 2023
2 parents b64b0d2 + 227f3a9 commit 8f19fbc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/rancher-desktop/main/deploymentProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ export function readDeploymentProfiles(): settings.DeploymentProfileType {
defaults: {},
locked: {},
};
const linuxPaths = {
[paths.deploymentProfileSystem]: ['defaults.json', 'locked.json'],
[paths.deploymentProfileUser]: ['rancher-desktop.defaults.json', 'rancher-desktop.locked.json'],
};

switch (os.platform()) {
case 'win32':
Expand Down Expand Up @@ -84,7 +80,12 @@ export function readDeploymentProfiles(): settings.DeploymentProfileType {
}
}
break;
case 'linux':
case 'linux': {
const linuxPaths = {
[paths.deploymentProfileSystem]: ['defaults.json', 'locked.json'],
[paths.deploymentProfileUser]: ['rancher-desktop.defaults.json', 'rancher-desktop.locked.json'],
};

for (const configDir in linuxPaths) {
const [defaults, locked] = linuxPaths[configDir];

Expand All @@ -93,6 +94,7 @@ export function readDeploymentProfiles(): settings.DeploymentProfileType {
break;
}
}
}
break;
case 'darwin':
for (const rootPath of [paths.deploymentProfileSystem, paths.deploymentProfileUser]) {
Expand Down

0 comments on commit 8f19fbc

Please sign in to comment.