Skip to content
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

Move TURBO_FORCE config env var detection to Rust #4590

Merged
merged 13 commits into from Apr 27, 2023
9 changes: 0 additions & 9 deletions cli/internal/run/run.go
Expand Up @@ -3,7 +3,6 @@ package run
import (
gocontext "context"
"fmt"
"os"
"sort"
"sync"
"time"
Expand Down Expand Up @@ -129,14 +128,6 @@ func optsFromArgs(args *turbostate.ParsedArgsFromRust) (*Opts, error) {
}

func configureRun(base *cmdutil.CmdBase, opts *Opts, signalWatcher *signals.Watcher) *run {
if os.Getenv("TURBO_FORCE") == "true" {
opts.runcacheOpts.SkipReads = true
}

if os.Getenv("TURBO_REMOTE_ONLY") == "true" {
opts.cacheOpts.SkipFilesystem = true
}

smaeda-ks marked this conversation as resolved.
Show resolved Hide resolved
processes := process.NewManager(base.Logger.Named("processes"))
signalWatcher.AddOnClose(processes.Close)
return &run{
Expand Down
8 changes: 4 additions & 4 deletions crates/turborepo-lib/src/cli.rs
Expand Up @@ -325,8 +325,8 @@ pub struct RunArgs {
#[clap(short = 'F', long, action = ArgAction::Append)]
pub filter: Vec<String>,
/// Ignore the existing cache (to force execution)
#[clap(long)]
pub force: bool,
#[clap(long, env = "TURBO_FORCE", default_missing_value = "false")]
smaeda-ks marked this conversation as resolved.
Show resolved Hide resolved
pub force: Option<Option<bool>>,
/// Specify glob of global filesystem dependencies to be hashed. Useful
/// for .env and files
#[clap(long = "global-deps", action = ArgAction::Append)]
Expand Down Expand Up @@ -379,8 +379,8 @@ pub struct RunArgs {
pub profile: Option<String>,
/// Ignore the local filesystem cache for all tasks. Only
/// allow reading and caching artifacts using the remote cache.
#[clap(long)]
pub remote_only: bool,
#[clap(long, env = "TURBO_REMOTE_ONLY", default_missing_value = "false")]
pub remote_only: Option<Option<bool>>,
/// Specify package(s) to act as entry points for task execution.
/// Supports globs.
#[clap(long)]
Expand Down