Skip to content

Commit b3c1be3

Browse files
authored
internal/profile: export profile loading function (#2916)
1 parent a4dc5bf commit b3c1be3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/profile/profile.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,12 @@ func LoadProfile(profileName string) (*Profile, error) {
237237
return nil, fmt.Errorf("error finding stack dir location: %w", err)
238238
}
239239

240-
profile, err := loadProfile(loc.ProfileDir(), profileName)
240+
return LoadProfileFrom(loc.ProfileDir(), profileName)
241+
}
242+
243+
// LoadProfile loads an existing profile from the provided directory.
244+
func LoadProfileFrom(dir, profileName string) (*Profile, error) {
245+
profile, err := loadProfile(dir, profileName)
241246
if err != nil {
242247
return nil, err
243248
}

0 commit comments

Comments
 (0)