-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ByteOtter
committed
Oct 9, 2023
1 parent
9a7a445
commit 5b5b2ee
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This module provides support functionality for the opinionated creation module. | ||
""" | ||
|
||
import subprocess | ||
|
||
from . import supported_tools | ||
|
||
|
||
def identify_package_manager() -> str: | ||
""" | ||
Identify which distribution's package manager is installed via trial and error. | ||
:return: The name of the package manager to be used to install dependencies. | ||
:rtype: str | ||
""" | ||
for pm in supported_tools.package_managers: | ||
try: | ||
subprocess.run(pm) | ||
except subprocess.CalledProcessError: | ||
continue | ||
return pm | ||
return "" |