Skip to content

Commit ee40c95

Browse files
committed
Print warning to stderr and exit 1 rather than 0
1 parent e1e3169 commit ee40c95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

relenv/toolchain.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
The ``relenv toolchain`` command.
55
"""
6+
import sys
67

78

89
def setup_parser(subparsers):
@@ -20,9 +21,11 @@ def main(*args, **kwargs):
2021
"""
2122
Notify users of toolchain command deprecation.
2223
"""
23-
print(
24-
"The relenv toolchain command has been deprecated. Please pip install relenv[toolchain]."
24+
sys.stderr.write(
25+
"The relenv toolchain command has been deprecated. Please pip install relenv[toolchain].\n"
2526
)
27+
sys.stderr.flush()
28+
sys.exit(1)
2629

2730

2831
if __name__ == "__main__":

0 commit comments

Comments
 (0)