Skip to content

Commit 87d76c4

Browse files
Merge pull request #60 from dev-sec/mysql_version
fix mysql_version command
2 parents a9bdef9 + df52e08 commit 87d76c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/mysql_version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ def initialize(user, pass)
2727
end
2828

2929
def mysql_version
30-
inspec.command("mysql -sN -e 'SHOW VARIABLES WHERE variable_name = \"version\"'").stdout.strip.split("\t")[1].to_s
30+
inspec.command("mysql -sN -e 'SHOW VARIABLES WHERE variable_name = \"version\"'").stdout.strip.split('\t')[1].split('-')[0].to_s
3131
end
3232
end

0 commit comments

Comments
 (0)