Skip to content

Fix lack of .exe extension on Windows - #22

Merged
mmicu merged 1 commit into
editorconfig-checker:mainfrom
HansWild:main
Dec 1, 2022
Merged

mmicu merged 1 commit into
editorconfig-checker:mainfrom
HansWild:main

Conversation

@HansWild

Copy link
Copy Markdown
Contributor

Hi there!

2.6.x broke Windows support for us. The reason is that due to below change, the ec executable no longer gets the .exe extension on Windows after installation. As such it is not recognized as executable anymore and you cannot execute it from CLI.

Source of problematic change: #20 (comment)

grafik

@mmicu

mmicu commented Oct 27, 2022

Copy link
Copy Markdown
Member

Hi @HansWild. From version 2.6.0, the .exe extension has been removed from the Windows executables. That's why it was also removed in the the pull requests you linked.

@HansWild

Copy link
Copy Markdown
Contributor Author

Hi @mmicu,

thank you for your quick reply! I have read and understood your discussions in linked merge request, and I am not questioning why this has changed in 2.6.0.

The problem we encounter is that we use this repo to conviniently get ec into our project environments, which no longer works. The correct executable is installed by the package and will thus end up in %path%, but you then still can't execute it because neither Command Prompt nor Powershell will recognize it if it has no .exe extension.

As such, the basic usage described in the Readme of this repo is no longer given:

Microsoft Windows [Version 10.0.19044.2006]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\xxx>pip install editorconfig-checker
Collecting editorconfig-checker
  Downloading editorconfig-checker-2.6.1.tar.gz (4.8 kB)
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for editorconfig-checker, since package 'wheel' is not installed.
Installing collected packages: editorconfig-checker
  Running setup.py install for editorconfig-checker ... done
Successfully installed editorconfig-checker-2.6.1

[notice] A new release of pip available: 22.2.2 -> 22.3
[notice] To update, run: python.exe -m pip install --upgrade pip

C:\Users\xxx>ec
Der Befehl "ec" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\xxx>

The error is the German version of "XYZ is not recognized as internal or external command..."

@mmicu

mmicu commented Oct 27, 2022 •

Copy link
Copy Markdown
Member

Hi @HansWild,

No problem.

I see. Then, probably, we can apply one of the following solutions:

  1. Try to create a new issue in the core repository and ask to add the extension back.
  2. Add the extension to the downloaded package if the OS is Windows (in the current setup.py).

Lastly, I do not know what you can do on your side, but maybe you can add some post-installation instructions to add the extension.

@HansWild

Copy link
Copy Markdown
Contributor Author
  1. Add the extension to the downloaded package if the OS is Windows (in the current setup.py).

This is what I am suggesting in this PR.

  1. Try to create a new issue in the core repository and ask to add the extension back.

I had a look at the changes in the core repo and the current state of the Makefile, and started to wonder if this change is even intentional, or if it simply is a bug.

@mmicu

mmicu commented Oct 31, 2022

Copy link
Copy Markdown
Member

Maybe we can first clarify the reason why it was removed. Then, we can simply add it here or wait for a new core version if this change was unintentional.

@HansWild

Copy link
Copy Markdown
Contributor Author

Unfortunately, I have not seen any reaction from core regarding this. Any advise on how to proceed?

@mmicu

mmicu commented Nov 30, 2022

Copy link
Copy Markdown
Member

Unfortunately, I have not seen any reaction from core regarding this. Any advise on how to proceed?

Hi. We could directly add the extension to the downloaded Windows executable.

The file without the .exe extension is not usable, right? If so, then maybe we can directly add it.

@HansWild

Copy link
Copy Markdown
Contributor Author

Unfortunately, I have not seen any reaction from core regarding this. Any advise on how to proceed?

Hi. We could directly add the extension to the downloaded Windows executable.

The file without the .exe extension is not usable, right? If so, then maybe we can directly add it.

Hi @mmicu, many thanks for the quick feedback!

Yes: To my best understanding, as things are right now, the file is unusable without the extension. I have tested both CMD and Powershell.

Hence this merge request, it reverts the part of the linked change #20, where the adding of the extension of windows was removed.

@mmicu

mmicu commented Nov 30, 2022

Copy link
Copy Markdown
Member

Hi @mmicu, many thanks for the quick feedback!

Hey, no problem.

Yes: To my best understanding, as things are right now, the file is unusable without the extension. I have tested both CMD and Powershell.

Yeah, I have tested the same a few weeks ago. Identical results.

Hence this merge request, it reverts the part of the linked change #20, where the adding of the extension of windows was removed.

Exactly. Did you try to install the package locally? Unfortunately, I cannot test it right now.

It would be great if you can send me the output of pip install . and ec.exe --version. Maybe in a single screenshot.

@HansWild

Copy link
Copy Markdown
Contributor Author

grafik

Like that?

@mmicu

mmicu commented Dec 1, 2022

Copy link
Copy Markdown
Member

grafik

Like that?

Yes, thank you. I will merge it and create a new release.

Thanks for your help.

@mmicu
mmicu merged commit 6a554ce into editorconfig-checker:main Dec 1, 2022
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