Skip to content

Commit 3c17d07

Browse files
committed
Remove deprecated --global.
1 parent 6278db4 commit 3c17d07

8 files changed

Lines changed: 3 additions & 137 deletions

File tree

FULL_HELP_DOCS.md

Lines changed: 0 additions & 109 deletions
Large diffs are not rendered by default.

cmd/crates/soroban-test/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ impl TestEnv {
272272
network: None,
273273
},
274274
source_account: account.parse().unwrap(),
275-
locator: config::locator::Args {
276-
global: false,
277-
config_dir,
278-
},
275+
locator: config::locator::Args { config_dir },
279276
sign_with: config::sign_with::Args {
280277
sign_with_key: None,
281278
hd_path: None,

cmd/soroban-cli/src/commands/keys/generate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ mod tests {
137137
fn set_up_test() -> (super::locator::Args, super::Cmd) {
138138
let temp_dir = tempfile::tempdir().unwrap();
139139
let locator = super::locator::Args {
140-
global: false,
141140
config_dir: Some(temp_dir.path().to_path_buf()),
142141
};
143142

cmd/soroban-cli/src/commands/message/sign.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ mod tests {
150150
fn setup_locator() -> locator::Args {
151151
let temp_dir = tempfile::tempdir().unwrap();
152152
locator::Args {
153-
global: false,
154153
config_dir: Some(temp_dir.path().to_path_buf()),
155154
}
156155
}

cmd/soroban-cli/src/commands/message/verify.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ mod tests {
165165
fn setup_locator() -> locator::Args {
166166
let temp_dir = tempfile::tempdir().unwrap();
167167
locator::Args {
168-
global: false,
169168
config_dir: Some(temp_dir.path().to_path_buf()),
170169
}
171170
}

cmd/soroban-cli/src/commands/mod.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::str::FromStr;
22

33
use clap::{error::ErrorKind, CommandFactory, FromArgMatches, Parser};
44

5-
use crate::{config, print::Print, utils::deprecate_message};
5+
use crate::config;
66

77
pub mod cache;
88
pub mod cfg;
@@ -104,16 +104,6 @@ impl Root {
104104
}
105105

106106
pub async fn run(&mut self) -> Result<(), Error> {
107-
let print = Print::new(self.global_args.quiet);
108-
109-
if self.global_args.locator.global {
110-
deprecate_message(
111-
print,
112-
"--global",
113-
"Global configuration is now the default behavior.",
114-
);
115-
}
116-
117107
match &mut self.cmd {
118108
Cmd::Completion(completion) => completion.run(),
119109
Cmd::Plugin(plugin) => plugin.run(&self.global_args).await?,

cmd/soroban-cli/src/commands/network/ls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Cmd {
4545
format!("\n{}", lines.join("\n"))
4646
};
4747

48-
(!self.config_locator.global || location == "Global").then(|| {
48+
(location == "Global").then(|| {
4949
Some(format!(
5050
"Name: {name}\nRPC url: {rpc_url}\nRPC headers:{headers}\nNetwork passphrase: {passphrase}",
5151
rpc_url = network.rpc_url,

cmd/soroban-cli/src/config/locator.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ pub enum Error {
110110
#[derive(Debug, clap::Args, Default, Clone)]
111111
#[group(skip)]
112112
pub struct Args {
113-
/// ⚠️ Deprecated: global config is always on
114-
#[arg(long, global = true, help_heading = HEADING_GLOBAL)]
115-
pub global: bool,
116-
117113
/// Location of config directory. By default, it uses `$XDG_CONFIG_HOME/stellar` if set, falling back to `~/.config/stellar` otherwise.
118114
/// Contains configuration files, aliases, and other persistent settings.
119115
#[arg(long, global = true, help_heading = HEADING_GLOBAL)]
@@ -159,11 +155,6 @@ impl Location {
159155

160156
impl Args {
161157
pub fn config_dir(&self) -> Result<PathBuf, Error> {
162-
if self.global {
163-
let print = Print::new(false);
164-
print.warnln("Flag --global is deprecated: global config is always used");
165-
}
166-
167158
self.global_config_path()
168159
}
169160

0 commit comments

Comments
 (0)