Skip to content

Commit 8ba4c58

Browse files
Sync with template
1 parent 9ca0952 commit 8ba4c58

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: 2024.1.1-306-g186666a
2+
_commit: 2024.2.0-5-g9ca0952
33
_src_path: gh:softboiler/copier-pipeline
44
actions_runner: ubuntu-22.04
55
github_repo_name: copier-pipeline

dev.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,16 @@ function Install-Uv {
4040
Invoke `uv`.#>
4141
Param([switch]$Update)
4242
$Env:PATH = "$HOME/.cargo/bin$([System.IO.Path]::PathSeparator)$Env:PATH"
43-
if (Get-Command 'uv' -ErrorAction 'Ignore') {
44-
if ($Update) { uv self update }
45-
return
43+
if ((Get-Command 'uv' -ErrorAction 'Ignore') -and $Update) {
44+
try { uv self update }
45+
catch [System.Management.Automation.NativeCommandExitException] {}
4646
}
4747
if ($IsWindows) {
4848
Invoke-RestMethod 'https://astral.sh/uv/install.ps1' | Invoke-Expression
4949
}
5050
else {
5151
curl --proto '=https' --tlsv1.2 -LsSf 'https://astral.sh/uv/install.sh' | sh
5252
}
53-
5453
}
5554

5655
function New-Switch {
@@ -222,6 +221,7 @@ function Sync-Template {
222221
if (!(Get-Command 'uv' -ErrorAction 'Ignore')) { Install-Uv -Update }
223222
$Copier = "copier@$(Get-Content '.copier-version')"
224223
$Ref = $Stay ? (Get-Content '.copier-answers.yml' | Find-Pattern '^_commit:\s.+-(.+)$') : $Ref
224+
if (!$Ref) {$Ref = 'HEAD'}
225225
if ($Recopy) {
226226
if ($Prompt) { return uvx $Copier recopy $Defaults --vcs-ref=$Ref }
227227
return uvx $Copier recopy --overwrite --defaults

0 commit comments

Comments
 (0)