File tree 2 files changed +4
-16
lines changed 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,13 @@ def _get_installed_tools_markdown(self) -> str:
133
133
tool_lines = []
134
134
135
135
if (nodejs_path := self .winpython_directory / NODEJS_RELATIVE_PATH ).exists ():
136
- version = utils .get_nodejs_version ( nodejs_path )
137
- tool_lines .append (f"[Nodejs](https://nodejs.org) | { version } | a JavaScript runtime built on Chrome's V8 JavaScript engine" )
138
- version = utils .get_npmjs_version ( nodejs_path )
136
+ version = utils .exec_shell_cmd ( "node -v" , nodejs_path ). splitlines ()[ 0 ]
137
+ tool_lines .append (f"[Nodejs](https://nodejs.org) | { version } | xa JavaScript runtime built on Chrome's V8 JavaScript engine" )
138
+ version = utils .exec_shell_cmd ( "npm -v" , nodejs_path ). splitlines ()[ 0 ]
139
139
tool_lines .append (f"[npmjs](https://www.npmjs.com) | { version } | a package manager for JavaScript" )
140
140
141
141
if (pandoc_exe := self .winpython_directory / "t" / "pandoc.exe" ).exists ():
142
- version = utils .get_pandoc_version ( str ( pandoc_exe .parent ))
142
+ version = utils .exec_shell_cmd ( "pandoc -v" , pandoc_exe .parent ). splitlines ()[ 0 ]. split ( " " )[ - 1 ]
143
143
tool_lines .append (f"[Pandoc](https://pandoc.org) | { version } | an universal document converter" )
144
144
145
145
if vscode_exe := (self .winpython_directory / "t" / "VSCode" / "Code.exe" ).exists ():
Original file line number Diff line number Diff line change @@ -166,18 +166,6 @@ def exec_run_cmd(args, path=None):
166
166
process = subprocess .run (args , capture_output = True , cwd = path , text = True )
167
167
return process .stdout
168
168
169
- def get_nodejs_version (path ):
170
- """Return version of the Nodejs installed in *path*."""
171
- return exec_shell_cmd ("node -v" , path ).splitlines ()[0 ]
172
-
173
- def get_npmjs_version (path ):
174
- """Return version of the Nodejs installed in *path*."""
175
- return exec_shell_cmd ("npm -v" , path ).splitlines ()[0 ]
176
-
177
- def get_pandoc_version (path ):
178
- """Return version of the Pandoc executable in *path*."""
179
- return exec_shell_cmd ("pandoc -v" , path ).splitlines ()[0 ].split (" " )[- 1 ]
180
-
181
169
def python_query (cmd , path ):
182
170
"""Execute Python command using the Python interpreter located in *path*."""
183
171
the_exe = get_python_executable (path )
You can’t perform that action at this time.
0 commit comments