Files
steampipe/pkg/modinstaller/install.go
Puskar Basu 3bdd2eedde Improve error message when running steampipe check/dashboard outside a mod and refactor default mod creation. Closes #3215
Rationalise default mod creation 
Fix nil ref exception for mod commands when using legacy `requires` block

---------

Co-authored-by: kai <kai@turbot.com>
2023-04-20 12:02:50 +01:00

31 lines
735 B
Go

package modinstaller
import (
"context"
"github.com/turbot/go-kit/helpers"
"github.com/turbot/steampipe/pkg/error_helpers"
"github.com/turbot/steampipe/pkg/utils"
)
func InstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (_ *InstallData, err error) {
utils.LogTime("cmd.InstallWorkspaceDependencies")
defer func() {
utils.LogTime("cmd.InstallWorkspaceDependencies end")
if r := recover(); r != nil {
error_helpers.ShowError(ctx, helpers.ToError(r))
}
}()
// install workspace dependencies
installer, err := NewModInstaller(opts)
if err != nil {
return nil, err
}
if err := installer.InstallWorkspaceDependencies(ctx); err != nil {
return nil, err
}
return installer.installData, nil
}