Skip to content

Commit

Permalink
Only perform these steps in a devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Mar 28, 2024
1 parent 011df97 commit e68bc02
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/Sync-Py.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ uv pip install --editable=scripts
if (!$NoPreSync) {
'*** RUNNING PRE-SYNC TASKS' | Write-Progress
'SYNCING SUBMODULES' | Write-Progress
$repo = Get-ChildItem /workspaces
$submodules = Get-ChildItem "$repo/submodules"
$safeDirs = @($repo) + $submodules
foreach ($dir in $safeDirs) {
if (!($safeDirs -contains $dir)) { git config --global --add safe.directory $dir }
if ($Env:DEVCONTAINER) {
$repo = Get-ChildItem /workspaces
$submodules = Get-ChildItem "$repo/submodules"
$safeDirs = @($repo) + $submodules
foreach ($dir in $safeDirs) {
if (!($safeDirs -contains $dir)) { git config --global --add safe.directory $dir }
}
}
git submodule update --init --merge
'SUBMODULES SYNCED' | Write-Progress -Done
Expand Down

0 comments on commit e68bc02

Please sign in to comment.