Skip to content

Commit

Permalink
Use cut_tail instad of more wordy way.
Browse files Browse the repository at this point in the history
  • Loading branch information
clifcox committed Feb 19, 2025
1 parent b4f18e6 commit 40ee9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oxidized/model/powerconnect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PowerConnect < Oxidized::Model
# Filter all command output
cmd :all do |cfg|
cfg.gsub! /\r+/, '' # Remove the CR characters echoed back from the commands
cfg.each_line.to_a[1..-2].join # Drop the last line which is the next prompt
cfg.cut_tail # Drop the last line which is the next prompt
end

cmd :secret do |cfg|
Expand Down

0 comments on commit 40ee9ba

Please sign in to comment.