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

“Not a valid executable” error in installer #1951

Closed
1 task done
brawaru opened this issue Nov 26, 2018 · 8 comments
Closed
1 task done

“Not a valid executable” error in installer #1951

brawaru opened this issue Nov 26, 2018 · 8 comments

Comments

@brawaru
Copy link

brawaru commented Nov 26, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
> cmd.exe /c ver

Microsoft Windows [Version 10.0.18272.1000]

Details

When configuring installation, there is option to select the other git editor.

  • What did you expect?

When I type out the code-exploration -w in the field, I expect it to run the Visual Studio Code exploration once I click “Test Custom Editor” and then allow me to proceed to installation.

  • What actually happened instead?

When I press the button it says “Not a valid executable: "cod".” No matter how you try to type the path or command, it will throw an error, I tried literally everything possible, including /d/Main/…, D:\Main\…, "D:\Main\…" and selecting the binary via the “Browse…” button after field.

image

@linquize
Copy link

https://github.com/git-for-windows/build-extra/blob/4dd83144dc06971722cbf83406b2f2f8ae9f9916/installer/install.iss#L1147 PathIsValidExecutable() uses FileExists() that does not check %PATH%.
At this moment, you need to enter full path, e.g. C:\path-to-exe\code-exploration.exe -w

@brawaru
Copy link
Author

brawaru commented Nov 26, 2018

Oh, that is actually worked, thank you, @linquize! ❤️

I tried to provide full path to code-insiders.bat because thought, the Visual Studio Code requires arguments passed to that batch file. But D:\…\Code - Exploration.exe worked too. And I see the .exe check now, that's why it failed… that error is pretty bad (like "cod" instead of "code-insiders"…)!

I will probably leave this issue open as the improvement suggestion: there probably no need in using FileExists, instead there could be just attempt to run the command with all environment variables present and if that fails, the error must be shown, or just improve the text above the field or error message, yeah 👍

@dscho
Copy link
Member

dscho commented Nov 26, 2018

@DaFri-Nochiterov unfortunately, times are pretty frantic over here, so I need to ask you to do more than just leave this issue open. Could you extend the code indicated by @linquize to test also for .cmd and .bat in addition to .exe, then open a PR (after verifying that it works)?

@aakriti-jain
Copy link

@dscho If the issues is not taken up yet, can I work on it?

@PhilipOakley
Copy link

@aakiiti-jain if @DaFri-Nochiterov isn't able to offer a PR, then Go For It (TM).

Contributions are welcome, as per #1951 (comment)

@brawaru
Copy link
Author

brawaru commented Dec 6, 2018

Yeah. I'm not familiar with language and tools, so it'll take me much time to learn to know all the stuff so to make any PR. This is also almost Christmas and there are many things to do atm. So yeah, if you want to make a PR — do it, please! <3

@dscho
Copy link
Member

dscho commented Dec 6, 2018

@aakriti-jain go for it! ;-)

@dscho
Copy link
Member

dscho commented Dec 26, 2018

This should be addressed by git-for-windows/build-extra#221

@dscho dscho closed this as completed Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants