Skip to content

Commit

Permalink
fix asyncos prompt for hostnames containing "-"
Browse files Browse the repository at this point in the history
Fixes #3327
  • Loading branch information
robertcheramy committed Dec 6, 2024
1 parent 2955168 commit 37ae366
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Fixed
- tplink: send 'enable' before the enable password. Fixes #3271 (@robertcheramy)
- asyncos: fix prompt for hostnames containing "-" . Fixes #3327 (@robertcheramy)


## [0.31.0 – 2024-11-29]
Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/model/asyncos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AsyncOS < Oxidized::Model
using Refinements

# ESA prompt "(mail.example.com)> " or "mail.example.com> "
prompt /^\r*([(]?[\w. ]+[)]?[#>]\s+)$/
prompt /^\r*\(?[\w.\- ]+\)?[#>]\s+$/
comment '! '

# Select passphrase display option
Expand Down
4 changes: 2 additions & 2 deletions spec/model/asyncos.rb → spec/model/asyncos_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
it 'matches different prompts' do
_('(mail.example.com)> ').must_match AsyncOS.prompt
_('mail.example.com> ').must_match AsyncOS.prompt
# Devices running in cluster mode (see issue #3327)
_('(Machine hostname) ').must_match AsyncOS.prompt
# Issue #3327
_('(Machine xx-xx-x1xx1-xxxx-xxxx.xxxx.xxxxx.example.xxx)> ').must_match AsyncOS.prompt
end
end

0 comments on commit 37ae366

Please sign in to comment.