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

Dynamic .cmd suffix for Terminal's first arg on Windows #27

Open
Mandera opened this issue Mar 10, 2023 · 1 comment
Open

Dynamic .cmd suffix for Terminal's first arg on Windows #27

Mandera opened this issue Mar 10, 2023 · 1 comment

Comments

@Mandera
Copy link
Collaborator

Mandera commented Mar 10, 2023

Hardcoded like this now, checking for npm and jest. Can detect if program is unavailable but program.cmd is available. Not sure if it can be done quickly

        if args[0] in ("npm", "jest") and VerInfo().windows:
            args[0] = f"{args[0]}.cmd"
@Mandera Mandera converted this from a draft issue Mar 10, 2023
@Mandera
Copy link
Collaborator Author

Mandera commented Mar 10, 2023

Alternatively catch programnotfounderror and retry with suffix, I don't really like that though. Worst case just make programs easier to edit with a class variable

@Mandera Mandera changed the title Dynamic .cmd suffix for Terminal's first arg Dynamic .cmd suffix for Terminal's first arg on Windows Mar 10, 2023
Mandera added a commit that referenced this issue Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant