Template
1
0
mirror of https://github.com/aminya/setup-cpp synced 2024-11-30 21:22:30 +08:00
setup-cpp/packages/exec-powershell
2022-08-07 20:04:59 -07:00
..
src docs: automatically create the readme for the packages 2022-08-07 18:18:26 -07:00
package.json feat: add untildify-user package 2022-08-07 20:04:59 -07:00
README.md docs: automatically create the readme for the packages 2022-08-07 18:18:26 -07:00
tsconfig.json feat: add exec-powershell package 2022-08-07 16:59:24 -07:00

exec-powershell

Version License: Apache--2.0

Run a powershell command.

Install

npm install --save exec-powershell

Usage

execPowershell (function)

Asynchronously execute a powershell command.

Parameters:

  • command (string) - The powershell command to execute
  • startupFlags (string[]) - The optional startup flags to be passed to powershell. Defaults to ["-NoProfile", "-NoLogo", "-NonInteractive"]. This means that the Powershell profile is not sourced first.
  • execOptions (execa.Options) - The options passed to execa. Defaults to { stdio: "inherit" }

returns: execa.ExecaChildProcess

execPowershellSync (function)

Execute a powershell command.

Parameters:

  • command (string) - The powershell command to execute
  • startupFlags (string[]) - The optional startup flags to be passed to powershell. Defaults to ["-NoProfile", "-NoLogo", "-NonInteractive"]. This means that the Powershell profile is not sourced first.
  • execOptions (execa.SyncOptions) - The options passed to execa. Defaults to { stdio: "inherit" }

returns: execa.ExecaSyncReturnValue

getPowerShell (function)

Get the path to the powershell executable.

returns: string

🤝 Contributing

You can sponsor my work here:

https://github.com/sponsors/aminya

Pull requests, issues and feature requests are welcome. See the Contributing guide.