(ctx context.Context, opts apps.RunOpts)
| 139 | ) |
| 140 | |
| 141 | func 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 | } |
no test coverage detected