Commit 90394d43 authored by Grant Ridder's avatar Grant Ridder
Browse files

Fix cookstyle offenses


Signed-off-by: default avatarGrant Ridder <shortdudey123@gmail.com>
parent 71cf971a
......@@ -37,11 +37,11 @@ erlang_checksum = node['erlang']['source']['checksum']
erlang_build_flags = node['erlang']['source']['build_flags']
erlang_cflags = node['erlang']['source']['cflags']
if erlang_version =~ /R\d*B\d*/
ver_check = "erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell"
else
ver_check = "erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), \"releases\", erlang:system_info(otp_release), \"OTP_VERSION\"])), erlang:display(erlang:binary_to_list(Version)), halt().' -noshell"
end
ver_check = if erlang_version =~ /R\d*B\d*/
"erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell"
else
"erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), \"releases\", erlang:system_info(otp_release), \"OTP_VERSION\"])), erlang:display(erlang:binary_to_list(Version)), halt().' -noshell"
end
bash 'install-erlang' do
cwd Chef::Config[:file_cache_path]
......
......@@ -6,11 +6,11 @@ ver = command(check).stdout
if ver =~ /R\d*B\d*/
describe command(check) do
its('stdout') { should match /R\d*B\d*/ }
its('stdout') { should match(/R\d*B\d*/) }
end
else
cmd = 'erl -eval \'{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().\''
describe command(cmd) do
its('stdout') { should match /\d?\.\d/ }
its('stdout') { should match(/\d?\.\d/) }
end
end
......@@ -6,11 +6,11 @@ ver = command(check).stdout
if ver =~ /R\d*B\d*/
describe command(check) do
its('stdout') { should match /R\d*B\d*/ }
its('stdout') { should match(/R\d*B\d*/) }
end
else
cmd = 'erl -eval \'{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().\''
describe command(cmd) do
its('stdout') { should match /\d?\.\d/ }
its('stdout') { should match(/\d?\.\d/) }
end
end
\ No newline at end of file
end
......@@ -6,11 +6,11 @@ ver = command(check).stdout
if ver =~ /R\d*B\d*/
describe command(check) do
its('stdout') { should match /R\d*B\d*/ }
its('stdout') { should match(/R\d*B\d*/) }
end
else
cmd = 'erl -eval \'{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().\''
describe command(cmd) do
its('stdout') { should match /\d?\.\d/ }
its('stdout') { should match(/\d?\.\d/) }
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment