Skip to content

Commit

Permalink
tools: fix encode secret on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnywong committed Jul 13, 2024
1 parent f6d0e73 commit 3ac6a1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tssh/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ func (m *passwordModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.passwordInput = m.passwordInput[:len(m.passwordInput)-1]
}
case tea.KeyRunes, tea.KeySpace:
m.passwordInput += string(msg.Runes)
if len(msg.Runes) > 0 && msg.Runes[0] != 0 {
m.passwordInput += string(msg.Runes)
}
m.err = nil
}
case error:
Expand Down

0 comments on commit 3ac6a1d

Please sign in to comment.