You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that on the Windows platform, when you run the init command for the first time, that there is a difference with how the ENOENT is raised to the NodeJS runtime.
This is a problem because there is a check in the ./src/command-bases/base.ts file that looks for -2 specifically to know if it needs to create a new config.json or not.
Repro
On the Windows platform, clone the master branch
Run yarn install
Run yarn build
Run ./bin/run init
Observer the exception
Additional details
On the macOS platform, it comes through accompanied with a -2errno value—
[Error: ENOENT: no such file or directory, open '/Users/erik.pena/.config/@mux/cli/config.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/erik.pena/.config/@mux/cli/config.json'
}
On the Windows platform, it comes through accompanied with a -4058errno value—
[Error: ENOENT: no such file or directory, open 'C:\Users\erikp\AppData\Local\@mux\cli\config.json'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\erikp\\AppData\\Local\\@mux\\cli\\config.json'
}
I also tested on the Linux platform, it comes through accompanied with a -2errno (like macOS) value—
[Error: ENOENT: no such file or directory, open '/home/erikpena/.config/@mux/cli/config.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/erikpena/.config/@mux/cli/config.json'
}
The text was updated successfully, but these errors were encountered:
In reviewing each of exceptions that are coming back, and I think a better check would be to look at the code property of the error and not the errno value. It seems in all three cases, we get the same ENOENT value.
Summary
It seems that on the Windows platform, when you run the
init
command for the first time, that there is a difference with how theENOENT
is raised to the NodeJS runtime.This is a problem because there is a check in the
./src/command-bases/base.ts
file that looks for-2
specifically to know if it needs to create a newconfig.json
or not.Repro
master
branchyarn install
yarn build
./bin/run init
Additional details
On the macOS platform, it comes through accompanied with a
-2
errno
value—On the Windows platform, it comes through accompanied with a
-4058
errno
value—I also tested on the Linux platform, it comes through accompanied with a
-2
errno
(like macOS) value—The text was updated successfully, but these errors were encountered: