Skip to content

Commit 9ffacea

Browse files
committed
Move a line of code
1 parent 359bbfb commit 9ffacea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentrycli/commands/update.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ pub fn make_app<'a, 'b: 'a>(app: App<'a, 'b>) -> App<'a, 'b>
117117
}
118118

119119
pub fn execute<'a>(_matches: &ArgMatches<'a>, _config: &Config) -> CliResult<()> {
120+
let current_version = env!("CARGO_PKG_VERSION");
120121
let exe = env::current_exe()?;
121122
let need_sudo = !utils::is_writable(&exe);
122123
let latest_release = get_latest_release()?;
@@ -125,9 +126,8 @@ pub fn execute<'a>(_matches: &ArgMatches<'a>, _config: &Config) -> CliResult<()>
125126
} else {
126127
exe.parent().unwrap().join(".sentry-cli.part")
127128
};
128-
let current_version = env!("CARGO_PKG_VERSION");
129-
println!("Latest release is {}", latest_release.version);
130129

130+
println!("Latest release is {}", latest_release.version);
131131
if latest_release.version == current_version {
132132
println!("Already up to date!");
133133
return Ok(());

0 commit comments

Comments
 (0)