Skip to content

Commit

Permalink
bootstrap: Use correct environment dir downstream
Browse files Browse the repository at this point in the history
Use PW_PROJECT_ROOT instead of PW_ROOT for the default location for the
environment directory.

Change-Id: I7f228c28ee56640251bfd40be7d99790d21cb30b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/118931
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Anthony DiGirolamo <[email protected]>
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Nov 11, 2022
1 parent 5cb38c7 commit aa6b9da
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bootstrap.bat
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ goto finish
:: came from the developer and not from a previous bootstrap possibly from
:: another workspace.

:: Not prefixing environment with "." since that doesn't hide it anyway.
if "%PW_PROJECT_ROOT%"=="" set "PW_PROJECT_ROOT=%PW_ROOT%"

if "%PW_ENVIRONMENT_ROOT%"=="" (
set "_PW_ACTUAL_ENVIRONMENT_ROOT=%PW_ROOT%\environment"
set "_PW_ACTUAL_ENVIRONMENT_ROOT=%PW_PROJECT_ROOT%\environment"
) else (
set "_PW_ACTUAL_ENVIRONMENT_ROOT=%PW_ENVIRONMENT_ROOT%"
)
Expand All @@ -99,8 +100,6 @@ set "shell_file=%_PW_ACTUAL_ENVIRONMENT_ROOT%\activate.bat"

set "_pw_start_script=%PW_ROOT%\pw_env_setup\py\pw_env_setup\windows_env_start.py"

if "%PW_PROJECT_ROOT%"=="" set "PW_PROJECT_ROOT=%PW_ROOT%"

:: If PW_SKIP_BOOTSTRAP is set, only run the activation stage instead of the
:: complete env_setup.
if not "%PW_SKIP_BOOTSTRAP%" == "" goto skip_bootstrap
Expand Down

0 comments on commit aa6b9da

Please sign in to comment.