Backwards compatibility with fisher v3 (#55)
This commit is contained in:
@@ -88,7 +88,19 @@ pub fn run_fisher(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
|
||||
print_separator("Fisher");
|
||||
|
||||
run_type.execute(&fish).args(&["-c", "fisher update"]).check_run()
|
||||
let version_str = run_type
|
||||
.execute(&fish)
|
||||
.args(&["-c", "fisher --version"])
|
||||
.check_output()?;
|
||||
debug!("Fisher version: {}", version_str);
|
||||
|
||||
if version_str.starts_with("fisher version 3.") {
|
||||
// v3 - see https://github.com/topgrade-rs/topgrade/pull/37#issuecomment-1283844506
|
||||
run_type.execute(&fish).args(&["-c", "fisher"]).check_run()
|
||||
} else {
|
||||
// v4
|
||||
run_type.execute(&fish).args(&["-c", "fisher update"]).check_run()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_bashit(ctx: &ExecutionContext) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user