Skip to content

Commit

Permalink
Merge pull request #18 from hackathi/patch-1
Browse files Browse the repository at this point in the history
watchAttach.applicationRunning - skip loading of Powershell profiles
  • Loading branch information
Trottero authored Apr 24, 2024
2 parents 05e2da6 + 686bfa4 commit 601907b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/watchAttach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class WatchAttach implements Disposable {

public applicationRunning(programName: string): boolean {
if (process.platform === 'win32') {
const args = ['tasklist', '/fi', `"IMAGENAME eq ${programName}"`];
const args = ['-NoProfile', 'tasklist', '/fi', `"IMAGENAME eq ${programName}"`];
const result = execFileSync('powershell.exe', args, {
encoding: 'utf8',
});
Expand Down

0 comments on commit 601907b

Please sign in to comment.