bolt icon indicating copy to clipboard operation
bolt copied to clipboard

(hack) Add `bolt script show` and `Get-BoltScript` commands

Open beechtom opened this issue 3 years ago • 0 comments

This adds new bolt script show and Get-BoltScript commands. When used without a script specified, they list all scripts available to the project. When a script is specified, they print the script to the console.

These commands load scripts from the scripts/ and files/scripts/ directories in a project and modules on the modulepath, similar to the bolt script run and Invoke-BoltScript commands. It does not load scripts that are in the files/ directory, as Bolt does not know whether a file in that directory is a script or a file used elsewhere in a module.

!feature

  • Add bolt script show and Get-BoltScript commands

    You can now view scripts available to a project using the new bolt script show and Get-BoltScript commands. These commands show scripts in the scripts/ and files/scripts/ directories for projects and modules.


This adds a new scripts project configuration option that allows users to create an allowlist of scripts that are available to the project. This option supports globbing. Any scripts that are not present in the allowlist will not appear in bolt script show or Get-BoltScript output, though they can still be run by users directly.

!feature

  • Add scripts project configuration option

    This new configuration option allows users to create an allowlist of scripts that are available to the project. Glob patterns are supported. Any scripts not in the allowlist are hidden from bolt script show and Get-BoltScript output, but can still be run directly by users.

beechtom avatar Jul 29 '22 19:07 beechtom