@@ -470,7 +470,7 @@ def activate_pyenv():
470
470
'' .format (
471
471
crayons .red ('Warning' , bold = True ),
472
472
crayons .white ('PATH' , bold = True )
473
- )
473
+ ), err = True
474
474
)
475
475
476
476
return path_to_python
@@ -746,7 +746,7 @@ def do_install_dependencies(
746
746
747
747
# We echo both c.out and c.err because pip returns error details on out.
748
748
click .echo (crayons .blue (format_pip_output (c .out )))
749
- click .echo (crayons .blue (format_pip_error (c .err )))
749
+ click .echo (crayons .blue (format_pip_error (c .err )), err = True )
750
750
751
751
# Return the subprocess' return code.
752
752
sys .exit (c .return_code )
@@ -1387,7 +1387,7 @@ def cli(
1387
1387
'so it will automatically use that environment, instead of '
1388
1388
'creating its own for any project.' .format (
1389
1389
crayons .green ('Courtesy Notice' )
1390
- )
1390
+ ), err = True
1391
1391
)
1392
1392
1393
1393
if ctx .invoked_subcommand is None :
@@ -1527,8 +1527,12 @@ def install(
1527
1527
try :
1528
1528
assert c .return_code == 0
1529
1529
except AssertionError :
1530
- click .echo ('{0} An error occurred while installing {1}!' .format (crayons .red ('Error: ' , bold = True ), crayons .green (package_name )))
1531
- click .echo (crayons .blue (format_pip_error (c .err )))
1530
+ click .echo (
1531
+ '{0} An error occurred while installing {1}!' .format (
1532
+ crayons .red ('Error: ' , bold = True ),
1533
+ crayons .green (package_name )
1534
+ ), err = True )
1535
+ click .echo (crayons .blue (format_pip_error (c .err )), err = True )
1532
1536
sys .exit (1 )
1533
1537
1534
1538
if dev :
@@ -1607,7 +1611,7 @@ def uninstall(
1607
1611
package_names = package_names .keys ()
1608
1612
1609
1613
if package_name is False and not dev :
1610
- click .echo (crayons .red ('No package provided!' ))
1614
+ click .echo (crayons .red ('No package provided!' ), err = True )
1611
1615
sys .exit (1 )
1612
1616
1613
1617
for package_name in package_names :
@@ -1886,10 +1890,10 @@ def check(three=None, python=False):
1886
1890
crayons .green (marker ),
1887
1891
crayons .blue (specifier ),
1888
1892
crayons .red (results [marker ])
1889
- )
1893
+ ), err = True
1890
1894
)
1891
1895
if failed :
1892
- click .echo (crayons .red ('Failed!' ))
1896
+ click .echo (crayons .red ('Failed!' ), err = True )
1893
1897
sys .exit (1 )
1894
1898
else :
1895
1899
click .echo (crayons .green ('Passed!' ))
@@ -1907,8 +1911,8 @@ def check(three=None, python=False):
1907
1911
try :
1908
1912
results = json .loads (c .out )
1909
1913
except ValueError :
1910
- click .echo ('An error occured:' )
1911
- click .echo (c .err )
1914
+ click .echo ('An error occured:' , err = True )
1915
+ click .echo (c .err , err = True )
1912
1916
sys .exit (1 )
1913
1917
1914
1918
for (package , resolved , installed , description , vuln ) in results :
0 commit comments