Skip to content

Fix path normalization on windows.#1095

Merged
haneefdm merged 3 commits intoMarus:masterfrom
PILIX123:master
Mar 29, 2025
Merged

Fix path normalization on windows.#1095
haneefdm merged 3 commits intoMarus:masterfrom
PILIX123:master

Conversation

@PILIX123
Copy link
Contributor

@PILIX123 PILIX123 commented Mar 3, 2025

The path.normalize() function returns a path with the \\ on windows. so i did a check after the normalize to replace the \\ if the platform is windows.

@PILIX123
Copy link
Contributor Author

#1101

src/gdb.ts Outdated

if (args.executable && !path.isAbsolute(args.executable)) {
args.executable = path.normalize(path.join(args.cwd, args.executable));
if(os.platform().startsWith("win")){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the .startsWith. Why not compare it to 'win32'. That is officially what it is. Also make sure you run 'npm run lint'

@haneefdm
Copy link
Collaborator

@PILIX123
Copy link
Contributor Author

@haneefdm Will do tonight. Thanks for the pointers i didnt know that win32 was official and win64 doesnt exist.

@PILIX123
Copy link
Contributor Author

@haneefdm I fixed the issues, sorry for the delay

@haneefdm haneefdm merged commit 92ad7ce into Marus:master Mar 29, 2025
3 checks passed
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.

2 participants