diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-05-28 17:53:05 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-06-03 11:46:53 -0700 |
commit | 8b7af81b7a4e3f177c9f02bf4738558d922c4b4f (patch) | |
tree | 633ef9dfa8595f5973fad6d63aac884f2bc6d646 | |
parent | e258096e8b1452263a7c89031e4ec94d2e0c323e (diff) | |
download | chef-8b7af81b7a4e3f177c9f02bf4738558d922c4b4f.tar.gz |
Remove a temp variable.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/chef/provider/powershell_script.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 196bb3cd6f..e0d6704936 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -56,7 +56,6 @@ class Chef end def validate_script_syntax! - interpreter_arguments = new_resource.flags Tempfile.open(["chef_powershell_script-user-code", ".ps1"]) do |user_script_file| # Wrap the user's code in a PowerShell script block so that # it isn't executed. However, syntactically invalid script @@ -74,7 +73,7 @@ class Chef # written to the file system at this point, which is required since # the intent is to execute the code just written to it. user_script_file.close - validation_command = "\"#{interpreter}\" #{interpreter_arguments} -Command \". '#{user_script_file.path}'\"" + validation_command = "\"#{interpreter}\" #{new_resource.flags} -Command \". '#{user_script_file.path}'\"" # Note that other script providers like bash allow syntax errors # to be suppressed by setting 'returns' to a value that the |