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
|
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
|
## How it Works
|
||||||
|
|
||||||
Well buster, i gotta say that's a little nosy, but if you must know,
|
Well buster, i gotta say that's a little nosy, but if you must know,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "no-more-imports"
|
name = "no-more-imports"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
description = "python with no imports"
|
description = "python with no imports"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "sneakers-the-rat", email = "sneakers-the-rat@protonmail.com"},
|
{name = "sneakers-the-rat", email = "sneakers-the-rat@protonmail.com"},
|
||||||
|
|
|
@ -142,6 +142,8 @@ def _do_install(packages: list[str], quiet: bool = False):
|
||||||
res = subprocess.run(['python', '-m', 'pip', 'install', package], capture_output=True)
|
res = subprocess.run(['python', '-m', 'pip', 'install', package], capture_output=True)
|
||||||
if res.returncode != 0:
|
if res.returncode != 0:
|
||||||
errors.append({'package': package, 'stdout': res.stdout, 'stderr': res.stderr})
|
errors.append({'package': package, 'stdout': res.stdout, 'stderr': res.stderr})
|
||||||
|
|
||||||
|
if not quiet:
|
||||||
if len(errors) == 0:
|
if len(errors) == 0:
|
||||||
print("sweet jesus we did it")
|
print("sweet jesus we did it")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue