Skip to content

Commit dca6588

Browse files
GearsDatapackslpil
authored andcommitted
Make it harder to publish gleam_* packages
1 parent 1906177 commit dca6588

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-cli/src/publish.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ use std::{collections::HashMap, io::Write, path::PathBuf, time::Instant};
2121

2222
use crate::{build, cli, docs, fs, http::HttpClient};
2323

24+
const CORE_TEAM_PUBLISH_PASSWORD: &str = "Trans rights are human rights";
25+
2426
pub fn command(paths: &ProjectPaths, replace: bool, i_am_sure: bool) -> Result<()> {
2527
let mut config = crate::config::root_config(paths)?;
2628

@@ -264,9 +266,9 @@ fn check_for_gleam_prefix(config: &PackageConfig) -> Result<bool, Error> {
264266
the prefix `gleam_`, which is for packages maintained by the Gleam
265267
core team.\n",
266268
);
267-
let should_publish = cli::confirm_with_text("I am part of the Gleam core team")?;
269+
let password = cli::ask_password("Please enter the core team password to continue")?;
268270
println!();
269-
Ok(should_publish)
271+
Ok(password == CORE_TEAM_PUBLISH_PASSWORD)
270272
}
271273

272274
struct Tarball {

0 commit comments

Comments
 (0)