@@ -6,7 +6,7 @@ use cargo::util::important_paths::find_root_manifest_for_wd;
6
6
#[ derive( Deserialize ) ]
7
7
pub struct Options {
8
8
flag_index : Option < String > ,
9
- flag_host : Option < String > ,
9
+ flag_host : Option < String > , // TODO: Deprecated, remove
10
10
flag_token : Option < String > ,
11
11
flag_manifest_path : Option < String > ,
12
12
flag_verbose : u32 ,
28
28
29
29
Options:
30
30
-h, --help Print this message
31
- --index INDEX Host to upload the package to
32
- --host HOST DEPRECATED
31
+ --index INDEX Registry index to upload the package to
32
+ --host HOST DEPRECATED, renamed to '--index'
33
33
--token TOKEN Token to use when uploading
34
34
--no-verify Don't verify package tarball before publish
35
35
--allow-dirty Allow publishing with a dirty source directory
@@ -56,7 +56,7 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
56
56
let Options {
57
57
flag_token : token,
58
58
flag_index : index,
59
- flag_host : host,
59
+ flag_host : host, // TODO: Deprecated, remove
60
60
flag_manifest_path,
61
61
flag_no_verify : no_verify,
62
62
flag_allow_dirty : allow_dirty,
@@ -66,6 +66,11 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
66
66
} = options;
67
67
68
68
69
+ // TODO: Deprecated
70
+ // remove once it has been decided --host can be removed
71
+ // We may instead want to repurpose the host flag, as
72
+ // mentioned in this issue
73
+ // https://github.com/rust-lang/cargo/issues/4208
69
74
let msg = "The flag '--host' is no longer valid.
70
75
71
76
Previous versions of Cargo accepted this flag, but it is being
@@ -84,7 +89,7 @@ about this warning.";
84
89
token : token,
85
90
index :
86
91
if host. clone ( ) . is_none ( ) || host. clone ( ) . unwrap ( ) . is_empty ( ) { index }
87
- else { config. shell ( ) . warn ( & msg) ?; host } ,
92
+ else { config. shell ( ) . warn ( & msg) ?; host } , // TODO: Deprecated, remove
88
93
verify : !no_verify,
89
94
allow_dirty : allow_dirty,
90
95
jobs : jobs,
0 commit comments