Skip to content
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

Merged
merged 3 commits into from
Nov 20, 2023
Merged

Conversation

sinedied
Copy link
Contributor

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?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

@anfibiacreativa anfibiacreativa changed the base branch from main to develop November 16, 2023 19:03
@anfibiacreativa
Copy link
Member

Please @sinedied target 'develop' until tomorrow evening.

Comment on lines -3 to +5
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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@anfibiacreativa anfibiacreativa merged commit 6cee9e6 into develop Nov 20, 2023
6 checks passed
@anfibiacreativa anfibiacreativa deleted the fix-win branch January 19, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants