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

Test Command does not support arguments on Windows. #741

Closed
nevercast opened this issue Jun 27, 2024 · 3 comments
Closed

Test Command does not support arguments on Windows. #741

nevercast opened this issue Jun 27, 2024 · 3 comments
Labels
bug Something isn't working fixed

Comments

@nevercast
Copy link

Using PowerShell inside VSCode on Windows 11 with Python 3.10 and Aider 0.40.5.

aider --test-cmd "npm run check" --test gives

Aider v0.40.5
...
'"npm run check"' is not recognized as an internal or external command, operable program or batch file 

Presumably you're calling out to shell (cmd, Windows) to execute the command, seems the quoting isn't working as I would expect.

I get the same output if I single or double quote, so it's not PowerShell that I'm calling aider from at fault, but instead how the execution is being constructed I suspect

Expected output would be that aider properly handles invoking a command with arguments on Windows.

I would expect this to work for lint-cmd too, I have not tested it.

I also have not tested using the config file, only command line invocation.

I have not checked the source code, but may do so in the coming days.

@user753
Copy link

user753 commented Jul 3, 2024

Quick fix is to change args to args[0] in

return self.cmd_run(args, True)

@paul-gauthier
Copy link
Owner

I think I've fix this. The change is available in the main branch. You can get it by installing the latest version from github:

python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git

If you have a chance to try it, let me know if it works better for you.

@paul-gauthier paul-gauthier added bug Something isn't working fixed labels Jul 3, 2024
@paul-gauthier
Copy link
Owner

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

3 participants