Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Error on Windows: options.env has an invalid environment variable name #116

Open
dreamerblue opened this issue Nov 27, 2019 · 0 comments
Open

Comments

@dreamerblue
Copy link

dreamerblue commented Nov 27, 2019

Windows 10
sudo-prompt 9.1.1

Run sudo.exec('echo %PATH%', { name: 'app', env: process.env })

Error occurred:

Error: options.env has an invalid environment variable name: "CommonProgramFiles(x86)"

Some of my env in process.env:

{
  ALLUSERSPROFILE: 'C:\\ProgramData',
  APPDATA: 'C:\\Users\\test\\AppData\\Roaming',
  CommonProgramFiles: 'C:\\Program Files\\Common Files',
  'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',
  CommonProgramW6432: 'C:\\Program Files\\Common Files',
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant