Skip to content

Commit

Permalink
Use consistent interface
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Feb 11, 2025
1 parent d1acf11 commit 6bed475
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions buildpacks/ruby/src/layers/bundle_download_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use crate::RubyBuildpack;
use crate::RubyBuildpackError;
use bullet_stream::state::SubBullet;
use bullet_stream::{style, Print};
use bullet_stream::Print;
use cache_diff::CacheDiff;
use commons::gemfile_lock::ResolvedBundlerVersion;
use commons::layer::diff_migrate::DiffMigrateLayer;
Expand Down Expand Up @@ -80,7 +80,7 @@ pub(crate) struct MetadataV1 {
}

fn download_bundler(
bullet: Print<SubBullet<Stdout>>,
mut bullet: Print<SubBullet<Stdout>>,
env: &Env,
metadata: &Metadata,
gem_path: &Path,
Expand All @@ -103,13 +103,12 @@ fn download_bundler(
"--env-shebang", // Start the `bundle` executable with `#! /usr/bin/env ruby`
]);

let timer = bullet.start_timer(format!("Running {}", style::command(short_name)));

cmd.named_output()
bullet
.time_cmd(&mut cmd.named(short_name))
.map_err(|error| fun_run::map_which_problem(error, cmd.mut_cmd(), env.get("PATH").cloned()))
.map_err(RubyBuildpackError::GemInstallBundlerCommandError)?;

Ok(timer.done())
Ok(bullet)
}

#[cfg(test)]
Expand Down

0 comments on commit 6bed475

Please sign in to comment.