Skip to content

Commit 7904ea8

Browse files
authored
Always emit deprecation warning for 'upload' and 'publish' (#2879)
1 parent bede32c commit 7904ea8

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/upload.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,17 @@ impl PublishOpt {
6565

6666
/// Set to non interactive mode if we're running on CI
6767
pub fn non_interactive_on_ci(&mut self) {
68-
if !self.non_interactive && env::var("CI").map(|v| v == "true").unwrap_or_default() {
69-
let msg = "⚠️ Warning: The maturin upload and publish commands are deprecated and will be removed in the future. For more information see: https://github.com/PyO3/maturin/issues/2334";
70-
eprintln!("{msg}");
71-
72-
if env::var("GITHUB_ACTIONS")
73-
.map(|v| v == "true")
74-
.unwrap_or_default()
75-
{
76-
// Also emit a warning annotation on the GH action
77-
println!("::warning::{msg}");
78-
}
68+
let msg = "⚠️ Warning: The maturin upload and publish commands are deprecated and will be removed in the future. For more information see: https://github.com/PyO3/maturin/issues/2334";
69+
eprintln!("{msg}");
70+
if env::var("GITHUB_ACTIONS")
71+
.map(|v| v == "true")
72+
.unwrap_or_default()
73+
{
74+
// Also emit a warning annotation on the GH action
75+
println!("::warning::{msg}");
76+
}
7977

78+
if !self.non_interactive && env::var("CI").map(|v| v == "true").unwrap_or_default() {
8079
eprintln!("🎛️ Running in non-interactive mode on CI");
8180
self.non_interactive = true;
8281
}

0 commit comments

Comments
 (0)