Skip to content

Conversation

coolhome
Copy link

@coolhome coolhome commented Sep 13, 2023

Summary

Fixing the ability to use this a puppet bolt task.

Reproduction Steps:

  1. Init new Bolt Project
  2. Add Module puppetlabs-chocolatey
  3. Run bolt task run chocolatey --log-level trace --targets localhost action="install" package="notepadplusplus"

Error Output:

{
  "target": "localhost",
  "action": "task",
  "object": "chocolatey",
  "status": "failure",
  "value": {
    "_error": {
      "kind": "ArgumentError",
      "msg": "unknown keywords: :_task, :_installdir",
      "details": {
        "backtrace": [
          "C:/Users/REDACTED/AppData/Local/Temp/wo3sspbp.4hi/chocolatey/tasks/init.rb:11:in `task'",
          "C:/Users/REDACTED/AppData/Local/Temp/wo3sspbp.4hi/ruby_task_helper/files/task_helper.rb:58:in `run'",
          "C:/Users/REDACTED/AppData/Local/Temp/wo3sspbp.4hi/chocolatey/tasks/init.rb:37:in `<main>'"
        ]
      }
    }
  }
}

Additional Context

Running task chocolatey with '{"action":"install","package":"notepadplusplus","_task":"chocolatey"}' on ["localhost"]

Related Issues (if any)

None

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

Do not crash on overflow of arguments
@coolhome coolhome requested a review from a team as a code owner September 13, 2023 00:02
@CLAassistant
Copy link

CLAassistant commented Sep 13, 2023

CLA assistant check
All committers have signed the CLA.

@coolhome
Copy link
Author

I'm going to need some time to get ruby up and running and add a test case + fix anything else broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants