respect quiet settings and document
This commit is contained in:
parent
72fcce0247
commit
e24c1ff030
3 changed files with 13 additions and 5 deletions
|
@ -71,6 +71,12 @@ pip install no-more-imports
|
|||
|
||||
Do not use this package
|
||||
|
||||
### Configuration
|
||||
|
||||
env vars:
|
||||
|
||||
- `NMI_QUIET=true` - don't print anything to stdout like when installing packages we forgot to ask for
|
||||
|
||||
## How it Works
|
||||
|
||||
Well buster, i gotta say that's a little nosy, but if you must know,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "no-more-imports"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
description = "python with no imports"
|
||||
authors = [
|
||||
{name = "sneakers-the-rat", email = "sneakers-the-rat@protonmail.com"},
|
||||
|
|
|
@ -142,10 +142,12 @@ def _do_install(packages: list[str], quiet: bool = False):
|
|||
res = subprocess.run(['python', '-m', 'pip', 'install', package], capture_output=True)
|
||||
if res.returncode != 0:
|
||||
errors.append({'package': package, 'stdout': res.stdout, 'stderr': res.stderr})
|
||||
if len(errors) == 0:
|
||||
print("sweet jesus we did it")
|
||||
else:
|
||||
print(f"some problems here pal:\n{pformat(errors, indent=2, compact=True)}")
|
||||
|
||||
if not quiet:
|
||||
if len(errors) == 0:
|
||||
print("sweet jesus we did it")
|
||||
else:
|
||||
print(f"some problems here pal:\n{pformat(errors, indent=2, compact=True)}")
|
||||
|
||||
|
||||
def install():
|
||||
|
|
Loading…
Reference in a new issue