Skip to content

Commit

Permalink
bug: Fix config apply to all profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus64 committed Feb 11, 2023
1 parent e8e337d commit c975aaf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"imports": {
"testing": "https://deno.land/std@0.152.0/testing/asserts.ts",
"$/": "./src/",
"colors": "https://deno.land/std@0.170.0/fmt/colors.ts",
"home_dir": "https://deno.land/x/dir@1.5.1/home_dir/mod.ts",
"flags": "https://deno.land/std@0.168.0/flags/mod.ts",
"fs": "https://deno.land/std@0.74.0/fs/mod.ts",
"flags": "https://deno.land/std@0.168.0/flags/mod.ts"
"home_dir": "https://deno.land/x/dir@1.5.1/home_dir/mod.ts",
"testing": "https://deno.land/std@0.152.0/testing/asserts.ts"
}
}
}
8 changes: 8 additions & 0 deletions script.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


const res = await fetch('https://2zrysvpla9.execute-api.eu-west-2.amazonaws.com/prod/themes')
const themes = await res.json()

const theme = themes.filter(t => t.name === "3024 Day")[0]

console.log(JSON.stringify(theme))
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const changeConfig = async (
const profiles = data.profiles.list;

profiles.forEach((prof) => {
changeProfileValues(prof, flags);
const terminalProfile = flags.t ?? flags.terminal
if (prof.name === terminalProfile)
changeProfileValues(prof, flags);
});

const newConfig = JSON.stringify(data, null, "\t");
Expand Down

0 comments on commit c975aaf

Please sign in to comment.