ask profiles vs aws profiles

This commit is contained in:
Emil Lerch 2026-02-04 14:13:02 -08:00
parent b13dee642f
commit 159e76e5e7
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -73,15 +73,15 @@ pub fn main() !u8 {
};
defer ask_parsed.deinit();
// Use profile name to look up skill ID, defaulting to "default"
const profile_name = profile orelse "default";
// Skill ID is always under "default" profile in ask-states.json
// (ASK CLI profile is separate from AWS profile)
const profiles_obj = ask_parsed.value.object.get("profiles") orelse {
try stderr.print("No 'profiles' field in ask-states.json\n", .{});
try stderr.flush();
return 1;
};
const profile_obj = profiles_obj.object.get(profile_name) orelse {
try stderr.print("Profile '{s}' not found in ask-states.json\n", .{profile_name});
const profile_obj = profiles_obj.object.get("default") orelse {
try stderr.print("No 'default' profile in ask-states.json\n", .{});
try stderr.flush();
return 1;
};