hasii2011 / hasii2011/latestversions

Use the Installation checker from codeallybasic

Open
#4 0 comments 0 reactions 1 assignee Claimed by @hasii2011 View on GitHub
DRY
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```python
def _checkInstallation(self, commandToCheck) -> bool:
ans: bool = False
status: int = LatestVersions.runCommand(commandToCheck)
if status == 0:
ans = True
return ans

@classmethod
def runCommand(cls, programToRun: str) -> int:
"""

Args:
programToRun: What must be executed

Returns: The status return of the executed program
"""
completedProcess: CompletedProcess = subProcessRun([programToRun], shell=True, capture_output=True, text=True, check=False)
return completedProcess.returncode

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.