mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add Sandbox Inspection and Debugging Commands (#261)
* feat: add sandbox DX commands * fix: Linter errors * fix: Sandbox deny log parsing * fix: Sandbox docs * refactor: Maintain SSOT across pkg dependencies * fix: Linter errors
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/safedep/dry/log"
|
||||
"github.com/safedep/ptyx"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
@@ -93,7 +94,9 @@ func NewSession(ctx context.Context, cfg SessionConfig) (InteractiveSession, err
|
||||
// 2. Set raw mode, save old state
|
||||
oldState, err := c.MakeRaw()
|
||||
if err != nil {
|
||||
c.Close()
|
||||
if closeErr := c.Close(); closeErr != nil {
|
||||
log.Warnf("failed to close console after MakeRaw error: %v", closeErr)
|
||||
}
|
||||
return nil, fmt.Errorf("failed to set raw mode: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user