Skip to content

Commit

Permalink
Add --pull flag to the start command
Browse files Browse the repository at this point in the history
  • Loading branch information
visortelle committed Apr 25, 2024
1 parent e37ea49 commit ec38d02
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ pub struct StartCommandArgs {
#[arg(long, default_value_t = false)]
pub no_kill: bool,

/// Pull images before starting the instance
#[arg(long, default_value_t = false)]
pub pull: bool,

/// Disable opening the browser after starting the instance
#[arg(long, default_value_t = false)]
pub no_open_browser: bool,
Expand Down Expand Up @@ -631,10 +635,13 @@ fn start_cmd(args: StartCommandArgs) -> Result<InstanceOutput> {
docker_compose_file.to_str().unwrap(),
"up",
"--remove-orphans",
"--pull",
"always",
];

if args.pull {
docker_compose_args.push("--pull");
docker_compose_args.push("always");
}

if !args.follow {
docker_compose_args.push("--wait");
docker_compose_args.push("--wait-timeout");
Expand Down

0 comments on commit ec38d02

Please sign in to comment.