Skip to content

Commit

Permalink
fix: remove duplicated paths on windows when creating a task
Browse files Browse the repository at this point in the history
  • Loading branch information
hverlin committed Dec 16, 2024
1 parent 45bd1dc commit fb4acb9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/miseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,15 +546,19 @@ export class MiseService {
}

const configFiles = new Set<string>();
configFiles.add(path.join(getRootFolderPath() || "", "mise.toml"));
configFiles.add(path.join(os.homedir(), ".config", "mise", "config.toml"));
configFiles.add(
expandPath(path.join(getRootFolderPath() || "", "mise.toml")),
);
configFiles.add(
expandPath(path.join(os.homedir(), ".config", "mise", "config.toml")),
);

const miseConfigs = (await this.getMiseConfigFiles())
.map((file) => expandPath(file.path))
.filter((path) => path.endsWith(".toml"));

for (const file of miseConfigs) {
configFiles.add(file);
configFiles.add(expandPath(file));
}

return Array.from(configFiles);
Expand Down

0 comments on commit fb4acb9

Please sign in to comment.