MCPcopy Create free account
hub / github.com/Scalingo/cli / runOneOffCommand

Function runOneOffCommand

cmd/run.go:141–158  ·  view source on GitHub ↗
(ctx context.Context, opts apps.RunOpts)

Source from the content-addressed store, hash-verified

139)
140
141func runOneOffCommand(ctx context.Context, opts apps.RunOpts) error {
142 isDB, err := utils.IsResourceDatabase(ctx, opts.App)
143 if err != nil && !errors.Is(err, utils.ErrResourceNotFound) {
144 errorQuit(ctx, err)
145 }
146 if isDB {
147 io.Error("It is currently impossible to use `" + opts.Cmd[0] + "` on a database.")
148 return nil
149 }
150
151 utils.CheckForConsent(ctx, opts.App)
152
153 err = apps.Run(ctx, opts)
154 if err != nil {
155 errorQuit(ctx, err)
156 }
157 return nil
158}

Callers 1

run.goFile · 0.85

Calls 5

IsResourceDatabaseFunction · 0.92
ErrorFunction · 0.92
CheckForConsentFunction · 0.92
RunFunction · 0.92
errorQuitFunction · 0.85

Tested by

no test coverage detected