You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var content []byte
// set content
project, err := loader.LoadWithContext(context.TODO(), compose.ConfigDetails{ConfigFiles: []compose.ConfigFile{{Content: content}}})
fails with err failed to read file "": open : no such file or directory because it's trying to load the Compose config from "" in order to get the project name.
Workaround is to set the project name ourselves:
project, err := loader.LoadWithContext(context.TODO(), compose.ConfigDetails{ConfigFiles: []compose.ConfigFile{{Content: content}}}, func(o *loader.Options) {
o.SetProjectName("project1", true) // HACK: workaround for a bug in compose-go where it insists on loading the project name from the first file
})
The text was updated successfully, but these errors were encountered:
fails with err
failed to read file "": open : no such file or directory
because it's trying to load the Compose config from""
in order to get the project name.Workaround is to set the project name ourselves:
The text was updated successfully, but these errors were encountered: