Skip to content

Commit

Permalink
chore: add local and global versions in debug (vercel#3661)
Browse files Browse the repository at this point in the history
Adds some additional debug logs in the shim about the global/local
versions:
```
olszewski@chriss-mbp sushiswap % turbo_dev -vv --version
2023-02-06T13:38:47.876-0800 [DEBUG] turborepo_lib::shim: Global turbo version: 1.7.3
2023-02-06T13:38:47.880-0800 [DEBUG] turborepo_lib::shim: Local turbo version: 1.7.2
2023-02-06T13:38:47.880-0800 [DEBUG] turborepo_lib::shim: Running local turbo binary in /private/tmp/sushiswap/node_modules/.bin/turbo

2023-02-06T13:38:47.880-0800 [DEBUG] turborepo_lib::shim: supports_skip_infer_and_single_package true
1.7.2
```

a future PR will add this to the github issues template once this gets
released
  • Loading branch information
chris-olszewski authored Feb 7, 2023
1 parent ca72f9e commit be1af9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/turborepo-lib/src/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ impl LocalTurboState {
let package_json: PackageJson =
serde_json::from_reader(File::open(local_turbo_package_path).ok()?).ok()?;

debug!("Local turbo version: {}", package_json.version);
Some(Self {
bin_path: local_turbo_path,
version: package_json.version,
Expand Down Expand Up @@ -510,6 +511,7 @@ pub fn run() -> Result<Payload> {
let args = ShimArgs::parse()?;

init_env_logger(args.verbosity);
debug!("Global turbo version: {}", get_version());

// If skip_infer is passed, we're probably running local turbo with
// global turbo having handled the inference. We can run without any
Expand Down

0 comments on commit be1af9a

Please sign in to comment.