Skip to content

Commit

Permalink
Merge pull request #71 from VioletXF/master
Browse files Browse the repository at this point in the history
fix: change powershell output encoding to UTF-8
  • Loading branch information
yibn2008 authored Dec 28, 2024
2 parents 454c49e + eb9e2ec commit 22ffe20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/find_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const finders = {
freebsd: 'darwin',
win32 (cond) {
return new Promise((resolve, reject) => {
const cmd = 'Get-CimInstance -className win32_process | select Name,ProcessId,ParentProcessId,CommandLine,ExecutablePath'
const cmd = '[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; Get-CimInstance -className win32_process | select Name,ProcessId,ParentProcessId,CommandLine,ExecutablePath'
const lines = []

const proc = utils.spawn('powershell.exe', ['/c', cmd], { detached: false, windowsHide: true })
Expand Down

0 comments on commit 22ffe20

Please sign in to comment.