From b56ea0bd8b6b1c265752226666f1069d0a479438 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 12 Sep 2022 16:10:09 +0200 Subject: refactor: add ctx:write_php_exec_wrapper utility (#409) --- lua/mason-registry/phpstan/init.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lua/mason-registry/phpstan/init.lua') diff --git a/lua/mason-registry/phpstan/init.lua b/lua/mason-registry/phpstan/init.lua index bc0bf3ff..688bd75a 100644 --- a/lua/mason-registry/phpstan/init.lua +++ b/lua/mason-registry/phpstan/init.lua @@ -29,16 +29,7 @@ return Pkg.new { ctx:link_bin("phpstan", "phpstan") end, win = function() - ctx:link_bin( - "phpstan", - ctx:write_shell_exec_wrapper( - "phpstan", - ("php %q"):format(path.concat { - ctx.package:get_install_path(), - "phpstan.phar", - }) - ) - ) + ctx:link_bin("phpstan", ctx:write_php_exec_wrapper("phpstan", "phpstan.phar")) end, } end, -- cgit v1.2.3-70-g09d2