Skip to content

Conversation

@andrewstevens-infineon
Copy link

The final pasting of working dir and captured filenames from make output uses python native pathname joining. This cannot allow for the special pathname conventions Posix shell environments (MSYS, cygwin) use to handle Windows drive-letters.
This PR allows the shell environment being used to be specified and adjusts pathname pasting to create a legal Windows pathname.

@TunaCici
Copy link

TunaCici commented Feb 5, 2024

Hey,

I've tested this PR against MSYS2 on my Windows 10 machine. I liked the overall approach you took. However, there are some edge cases that needs to be handled and improvements to be made.

  • New function to_native_pathname() assumes that pathname starts with either "/..." OR "/cygdrive". This causes a NoneType return if pathname is just a file name (e.g. HelloWorld.c). One simply (but ugly) fix would be to add else tags for both # MSYS and # Cygwin.
  • joined_path_name seems to be unused. Could be removed.
  • The drive letters are lowercase; they could be uppercase to fit into the Windows styling.
  • In the PR description you could mention that --win-posix-shell is added to CLI.

The first issue NEEDS to be handled otherwise the program crashes :/

Thanks again for the PR ☀️

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