Skip to content

Commit 4d3c461

Browse files
committed
fix(cli): use %APPDATA% on Windows, not %AppData%
According to https://web.archive.org/web/20120905053951/http://download.microsoft.com/download/e/6/a/e6aa654f-cccb-421e-9b50-3392e9886084/VistaFileSysNamespaces.pdf, this environment variable it ALLCAPS and at least in Node.JS, it's case-sensitive.
1 parent 8b4e889 commit 4d3c461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/cli/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function userConfigDir() {
1717
case 'darwin':
1818
return `${homedir()}/Library/Application Support`;
1919
case 'win32':
20-
if (process.env['AppData']) {
21-
return process.env['AppData'];
20+
if (process.env['APPDATA']) {
21+
return process.env['APPDATA'];
2222
} else {
23-
throw new Error('%AppData% is not set correctly');
23+
throw new Error('%APPDATA% is not set correctly');
2424
}
2525
case 'aix':
2626
case 'freebsd':

0 commit comments

Comments
 (0)