Page MenuHomePhabricator

Remove file extension from minus-x entry point for run under windows
Closed, ResolvedPublic

Description

minus-x is called in composer at the moment with the following code:

	"scripts": {
		"test": [
			"parallel-lint . --exclude vendor",
			"phpcs -p -s",
			"minus-x.php check ."
		],
		"fix": [
			"phpcbf",
			"minus-x.php fix ."
		]
	}

Under windows this just open the php file in an editor. This is not helpful and stops the processing until the editor is closed.

Please remove the php extension from entry point to allow running of the script under windows.

Please also add a .bat file for easier use of the script.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 27 2017, 9:18 PM
Umherirrender renamed this task from Remove extension from minus-x entry point for run under windows to Remove file extension from minus-x entry point for run under windows.Oct 27 2017, 9:37 PM
Legoktm claimed this task.Oct 27 2017, 11:34 PM
Legoktm added a subscriber: Legoktm.

Please also add a .bat file for easier use of the script.

I was under the impression that composer was supposed to do this automatically?

Change 386969 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/minus-x@master] Drop .php extension from minus-x command

https://gerrit.wikimedia.org/r/386969

Please also add a .bat file for easier use of the script.

I was under the impression that composer was supposed to do this automatically?

Specifically, see https://getcomposer.org/doc/articles/vendor-binaries.md#what-about-windows-and-bat-files-.

Please also add a .bat file for easier use of the script.

I was under the impression that composer was supposed to do this automatically?

Specifically, see https://getcomposer.org/doc/articles/vendor-binaries.md#what-about-windows-and-bat-files-.

I was looking at phpcs and phpcbf where a .bat file exists. But composer will create one in the vendor/bin folder and that works

Change 386969 merged by jenkins-bot:
[mediawiki/tools/minus-x@master] Drop .php extension from minus-x command

https://gerrit.wikimedia.org/r/386969