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

Support for Posix shell emulation (MSYS, Cygwin) pathname conven… #110

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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