We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6103f03 commit d45bb61Copy full SHA for d45bb61
internal/profile/profile.go
@@ -237,7 +237,12 @@ func LoadProfile(profileName string) (*Profile, error) {
237
return nil, fmt.Errorf("error finding stack dir location: %w", err)
238
}
239
240
- profile, err := loadProfile(loc.ProfileDir(), profileName)
+ 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)
246
if err != nil {
247
return nil, err
248
0 commit comments