-
Notifications
You must be signed in to change notification settings - Fork 1.8k
cli: set I/O stream to Stdio:null if the given solana_version is already installed
#2757
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
Conversation
|
@simplysabir is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
acheroncrypto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your interest in contributing to Anchor!
This implementation doesn't currently solve the issue described in #2724 because the installation progress is still not visible.
So i Should do this right?
am i right on this approach? |
Yes, the I/O behavior should change based on whether the version is already installed. |
Added another implementation kindly have a look. |
acheroncrypto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments don't add any context to what's being done, please remove them.
|
@acheroncrypto Removed comments and updated the fn is_solana_version_installed(version: &str) -> Result<bool> {
let output = std::process::Command::new("ls")
.arg("-l")
.arg("~/.local/share/solana/install/releases")
.output()?;
if output.status.success() {
let output_versions = std::str::from_utf8(&output.stdout)?;
Ok(output_versions.lines().any(|line| line.contains(version)))
} else {
Err(anyhow!("Failed to list Solana installed versions"))
}
} |
acheroncrypto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great but I've changed ls command to solana-install list to make it simpler and OS agnostic.
Thank you for contributing!
Description :
solana_versionis not installed in CLI #2724