Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
  • Loading branch information
crenshaw-dev committed Jul 7, 2022
1 parent a1b194d commit a639956
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/operator-manual/argocd-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,5 +289,5 @@ data:
# exec.enabled indicates whether the UI exec feature is enabled. It is disabled by default.
exec.enabled: "false"

# exec.shells determines which shells are allowed for `exec`, and in which order they are attempted
# exec.shells restricts which shells are allowed for `exec`, and in which order they are attempted
exec.shells: "bash,sh,powershell,cmd"
6 changes: 3 additions & 3 deletions server/application/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type terminalSession struct {
sizeChan chan remotecommand.TerminalSize
doneChan chan struct{}
tty bool
readMu sync.Mutex
readLock sync.Mutex
}

// newTerminalSession create terminalSession
Expand Down Expand Up @@ -62,9 +62,9 @@ func (t *terminalSession) Next() *remotecommand.TerminalSize {

// Read called in a loop from remotecommand as long as the process is running
func (t *terminalSession) Read(p []byte) (int, error) {
t.readMu.Lock()
t.readLock.Lock()
_, message, err := t.wsConn.ReadMessage()
t.readMu.Unlock()
t.readLock.Unlock()
if err != nil {
log.Errorf("read message err: %v", err)
return copy(p, EndOfTransmission), err
Expand Down
2 changes: 1 addition & 1 deletion util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type ArgoCDSettings struct {
ServerRBACLogEnforceEnable bool `json:"serverRBACLogEnforceEnable"`
// ExecEnabled indicates whether the UI exec feature is enabled
ExecEnabled bool `json:"execEnabled"`
// ExecShells determines which shells are allowed for `exec` and in which order they are tried
// ExecShells restricts which shells are allowed for `exec` and in which order they are tried
ExecShells []string `json:"execShells"`
// TrackingMethod defines the resource tracking method to be used
TrackingMethod string `json:"application.resourceTrackingMethod,omitempty"`
Expand Down

0 comments on commit a639956

Please sign in to comment.