Skip to content

Commit

Permalink
chore [EASY]: untabify source validation code (#16217)
Browse files Browse the repository at this point in the history
## Description 

Tabs snuck in D: (I have fixed my editor)

## Test Plan 

N/A

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
rvantonder authored Feb 13, 2024
1 parent f9af03b commit bc62ed3
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions crates/sui-source-validation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,22 +628,22 @@ fn download_and_compile(
);

let mut response = match ureq::get(&mainnet_url).call() {
Ok(response) => response,
Err(ureq::Error::Status(404, _)) => {
println!(
"{} sui mainnet compiler {} not available, attempting to download testnet compiler release...",
"WARNING".bold().yellow(),
compiler_version.yellow()
);
println!(
"{} testnet compiler @ {} (this may take a while)",
"DOWNLOADING".bold().green(),
compiler_version.yellow()
);
let testnet_url = format!("https://github.com/MystenLabs/sui/releases/download/testnet-v{compiler_version}/sui-testnet-v{compiler_version}-{platform}.tgz");
ureq::get(&testnet_url).call()?
}
Err(e) => return Err(e.into()),
Ok(response) => response,
Err(ureq::Error::Status(404, _)) => {
println!(
"{} sui mainnet compiler {} not available, attempting to download testnet compiler release...",
"WARNING".bold().yellow(),
compiler_version.yellow()
);
println!(
"{} testnet compiler @ {} (this may take a while)",
"DOWNLOADING".bold().green(),
compiler_version.yellow()
);
let testnet_url = format!("https://github.com/MystenLabs/sui/releases/download/testnet-v{compiler_version}/sui-testnet-v{compiler_version}-{platform}.tgz");
ureq::get(&testnet_url).call()?
}
Err(e) => return Err(e.into()),
}.into_reader();

let dest_tarball = dest_version.join(format!("{}.tgz", compiler_version));
Expand Down Expand Up @@ -718,14 +718,14 @@ fn detect_platform(
("linux", "x86_64") => "ubuntu-x86_64",
("windows", "x86_64") => "windows-x86_64",
(os, arch) => bail!(
"The package {} needs to be built with sui compiler version {compiler_version} but there \
is no binary release available to download for your platform:\n\
Operating System: {os}\n\
Architecture: {arch}\n\
You can manually put a `sui` binary for your platform in {} and rerun your command to continue.",
package_path.display(),
dest_dir.display(),
),
"The package {} needs to be built with sui compiler version {compiler_version} but there \
is no binary release available to download for your platform:\n\
Operating System: {os}\n\
Architecture: {arch}\n\
You can manually put a `sui` binary for your platform in {} and rerun your command to continue.",
package_path.display(),
dest_dir.display(),
),
};
Ok(s.into())
}
Expand Down

0 comments on commit bc62ed3

Please sign in to comment.