[DAEMON-287] Remove winreglib dependency from appcd-response
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2019-10-25T19:24:07.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Appc Daemon 3.1.0 |
| Components | appcd-response |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Chris Barber |
| Created | 2019-10-24T17:22:25.000+0000 |
| Updated | 2019-10-25T19:24:07.000+0000 |
Description
appcd-response is used by several packages such as appcd-subprocess which is used by non-appcd projects. appcd-response needs to detect the locale in order to display the appropriate message. On Windows machines, the locale is retrieved from the Windows Registry.
Previously, appcd-response@1.x uses appcd-winreg (now deprecated) which in turned used winreg to simply spawn the
reg.exe command and query the registry.
When appcd-winreg was sunset, it was replaced with the new winreglib, a native Node.js addon. Now when a non-appcd project uses something like appcd-subprocess, it will depend on winreglib and that complicates install issues for specific environments such as Atom plugins on Linux.
The solution here is to replace appcd-response's winreglib dependency with two simple spawnSync() calls.
PR: https://github.com/appcelerator/appc-daemon/pull/437