mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-10-14 15:53:48 +08:00
exec, rollback: return error when no session found
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
@@ -35,6 +35,9 @@ COMMAND and ARG... will be executed in the container.
|
||||
}
|
||||
|
||||
func (cm *ExecCmd) Exec(ctx context.Context, args []string) error {
|
||||
if ref := cm.m.AttachedSessionID(); ref == "" {
|
||||
return errors.Errorf("no attaching session")
|
||||
}
|
||||
if len(args) < 2 {
|
||||
return errors.Errorf("command must be passed")
|
||||
}
|
||||
|
Reference in New Issue
Block a user