-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(indexer): incorrect path on Windows (#141) #142
Conversation
Co-authored-by: Yohan Lasorsa <noda@free.fr>
Please @sinedied target 'develop' until tomorrow evening. |
import { execSync } from 'node:child_process'; | ||
import { run } from '../dist/lib/cli.js'; | ||
|
||
if ((process.env.NODE_OPTIONS ?? '').includes('--no-warnings')) { | ||
run(process.argv); | ||
} else { | ||
// Silence experimental warnings | ||
try { | ||
execSync(process.argv.join(' '), { | ||
stdio: 'inherit', | ||
env: { | ||
...process.env, | ||
NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --no-warnings`, | ||
}, | ||
}); | ||
} catch { | ||
// Do nothing | ||
} | ||
} | ||
run(process.argv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused. What's the fix here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed code was only to silence warnings, but on Windows it introduces a path issue because of exec.
Purpose
Fixes path issues on Windows.
A warning due to using experimental feature in Node 18 will be displayed at runtime though, but does not impact the result.
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?