Uploaded image for project: 'Puppet Task Runner'
  1. Puppet Task Runner
  2. BOLT-102

Loading params from file on powershell triggers splat operator error

    Details

    • Template:
    • Acceptance Criteria:
      Hide

      Example commands should work on powershell

      Show
      Example commands should work on powershell
    • Sprint:
      Bolt Kanban
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Based on the documentation you should be able to load params from a file, using the @ symbol. However on powershell the @ is reserved. This would instead need to be passed quoted as a string I think.

      bolt plan run sample::example --params @params.json --modules /modules --debug
      

      At line:1 char:114
      + ... efault garethr/bolt plan run sample::example --params @params.json -u ...
      +                                                           ~~~~~~~
      The splatting operator '@' cannot be used to reference variables in an expression. '@params' can be used only as an
      argument to a command. To reference variables in an expression use '$params'.
          + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : SplattingNotPermitted
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  michael.smith Michael Smith
                  Reporter:
                  gareth Gareth Rushgrove
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: