Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename proto-compiler cli arg #420

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions proto-compiler/src/cmd/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct CloneCmd {

/// where to checkout the repository
#[argh(option, short = 'o')]
path: PathBuf,
out: PathBuf,
}

impl CloneCmd {
Expand All @@ -32,13 +32,13 @@ impl CloneCmd {
pub fn run(&self) {
self.validate();

let repo = if self.path.exists() {
let repo = if self.out.exists() {
println!(
"[info ] Found Cosmos SDK source at '{}'",
self.path.display()
self.out.display()
);

Repository::open(&self.path).unwrap_or_else(|e| {
Repository::open(&self.out).unwrap_or_else(|e| {
println!("[error] Failed to open repository: {}", e);
process::exit(1)
})
Expand All @@ -47,12 +47,12 @@ impl CloneCmd {

let url = "https://github.com/cosmos/cosmos-sdk";

let repo = Repository::clone(url, &self.path).unwrap_or_else(|e| {
let repo = Repository::clone(url, &self.out).unwrap_or_else(|e| {
println!("[error] Failed to clone the repository: {}", e);
process::exit(1)
});

println!("[info ] Cloned at '{}'", self.path.display());
println!("[info ] Cloned at '{}'", self.out.display());

repo
};
Expand Down