Skip to content

Conversation

IsaacUtah1379
Copy link

The current implementation does not allow specifying any arguments or options to pass to child_process.spawn when creating a new instance of PowerJS. This pull request modifies the constructor of PowerJS to accept optional shellArgs and options in the object of options passed to the constructor. These are then passed to the args and options arguments of child_process.spawn, respectively. If shellArgs and/or options is not passed to the constructor of PowerJS, then it is ignored, as per the current implementation.

Uses include passing flags to the initial invocation of PowerShell (available flags) and passing options that affect the child process itself, such as the current working directory or environment variables for the child process.

Closes #8 since -NoProfile can be one of the arguments passed with shellArgs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerJS always loads the PowerShell profile

1 participant