Skip to content

Commit e6c2a62

Browse files
fix(nsis): specify full path to system's find (#6771)
GIT-SCM installation can override window's native `find` command line tool with the one from unix tools. This in turn changes the exit code of the whole find process command and makes us detect the app as running even though it is not. Credit and original fix by @theAddict
1 parent c0ef4e2 commit e6c2a62

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/nine-ants-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(nsis): specify full path to system's find

packages/app-builder-lib/templates/nsis/include/allowOnlyOneInstallerInstance.nsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
${nsProcess::FindProcess} "${_FILE}" ${_ERR}
4141
!else
4242
# find process owned by current user
43-
nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" | find "${_FILE}"`
43+
nsExec::Exec `cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
4444
Pop ${_ERR}
4545
!endif
4646
!macroend

0 commit comments

Comments
 (0)