Skip to content

Commit f09e588

Browse files
author
william chu
committed
fix(gitops-cli): Output warning message to stderr
1 parent 5cff7ae commit f09e588

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitops/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23
from pathlib import Path
34

45
from .utils.cli import success, warning
@@ -16,9 +17,10 @@
1617
config = configparser.RawConfigParser()
1718
config.read(versions_path)
1819
min_gitops_version = config.get("gitops.versions", "gitops")
19-
print(warning("Please upgrade Gitops."))
2020
if parse_version(__version__) < parse_version(min_gitops_version):
21+
print(warning("Please upgrade Gitops."), file=sys.stderr)
2122
print(
2223
f"Your current version {success(__version__)} is less than the clusters minimum"
23-
f" requirement {success(min_gitops_version)}."
24+
f" requirement {success(min_gitops_version)}.",
25+
file=sys.stderr,
2426
)

0 commit comments

Comments
 (0)