Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rn readme #1

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main/ts/ps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const parseProcessList = (output: string, query: TPsLookupQuery = {}) =>
export const extractWmic = (stdout: string): string => {
const _stdout = stdout.split(EOL)
// Find the line index for the titles
const beginRow = _stdout.findIndex((out) => out.indexOf('CommandLine') === 0)
const beginRow = _stdout.findIndex(out => out?.indexOf('CommandLine') === 0)

// get rid of the start (copyright) and the end (current pwd)
// eslint-disable-next-line unicorn/prefer-negative-index
Expand Down Expand Up @@ -194,7 +194,7 @@ export const kill = (pid: string | number, opts?: TPsNext | TPsKillOptions | TPs

export const parseGrid = (output: string) =>
output
? formatOutput(parse(output))
? formatOutput(parse(output, { format: IS_WIN ? 'win' : 'unix' }))
: []

export const formatOutput = (data: TIngridResponse): TPsLookupEntry[] =>
Expand Down