runPowerShellScript
Last updated
import { showHUD } from "@raycast/api";
import { runPowerShellScript } from "@raycast/utils";
export default async function () {
const res = await runPowerShellScript(
`
Write-Host "hello, world."
`,
);
await showHUD(res);
}export type ParseExecOutputHandler<T> = (args: {
/** The output of the script on stdout. */
stdout: string;
/** The output of the script on stderr. */
stderr: string;
error?: Error | undefined;
/** The numeric exit code of the process that was run. */
exitCode: number | null;
/** The name of the signal that was used to terminate the process. For example, SIGFPE. */
signal: NodeJS.Signals | null;
/** Whether the process timed out. */
timedOut: boolean;
/** The command that was run, for logging purposes. */
command: string;
/** The options passed to the script, for logging purposes. */
options?: ExecOptions | undefined;
}) => T;