From 192ce5f101e6366bba6ea458ac8d29f978b07ce8 Mon Sep 17 00:00:00 2001 From: "Dang H. Nguyen" Date: Mon, 15 Mar 2021 15:22:31 -0700 Subject: [PATCH] Fixes Issue [#204](https://github.com/sous-chefs/chef-splunk/issues/204) --- .rubocop_todo.yml | 5 ++--- CHANGELOG.md | 1 + libraries/helpers.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2bc08cf9..8b7cd80e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,14 +1,13 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2020-06-30 20:30:26 -0700 using RuboCop version 0.75.1. +# on 2021-03-15 22:17:31 UTC using RuboCop version 1.7.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 1 ---- -ChefCorrectness/NodeNormal: +Chef/Correctness/NodeNormal: Exclude: - '**/metadata.rb' - '**/Berksfile' diff --git a/CHANGELOG.md b/CHANGELOG.md index b58a3d07..62af7713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ This file is used to list changes made in each version of the splunk cookbook. ## Unreleased +- Fixes Issue [#204](https://github.com/sous-chefs/chef-splunk/issues/204) ## 7.2.0 - *2021-03-12* diff --git a/libraries/helpers.rb b/libraries/helpers.rb index 511e9aea..86813555 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -110,7 +110,7 @@ def splunk_auth(auth) def splunk_login_successful? return false unless splunk_installed? - login = shell_out(splunk_cmd(%w(login -auth node.run_state['splunk_auth_info']))) + login = shell_out(splunk_cmd(['login', '-auth', node.run_state['splunk_auth_info']])) login.stderr.strip.empty? && login.stdout.strip.empty? && login.exitstatus == 0 end