Skip to content

Commit 88ffa31

Browse files
Copilotbytemain
andauthored
Check uv-build Python version in install step
Agent-Logs-Url: https://github.com/version-fox/vfox-python/sessions/5852e539-b06d-4c0c-b5d1-b981726a91d9 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent 54eaf46 commit 88ffa31

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/vfox-test.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,17 @@ jobs:
153153
if ($LASTEXITCODE -ne 0) {
154154
exit $LASTEXITCODE
155155
}
156-
$python_exe = Join-Path $HOME ".vfox\cache\python\v-3.10.20\python-3.10.20\python.exe"
157-
if (-not (Test-Path $python_exe)) {
158-
Write-Error "python@3.10.20 uv-build install did not create $python_exe"
159-
exit 1
160-
}
161156
vfox use -g python@3.10.20
157+
if ($LASTEXITCODE -ne 0) {
158+
exit $LASTEXITCODE
159+
}
162160
vfox current
161+
$python_version = $(python -c 'import sys;print(sys.version)')
162+
Write-Output $python_version
163+
164+
if ($python_version -notlike "3.10.20*") {
165+
exit 1
166+
}
163167
164168
- name: Check uv-build python 3.10.20
165169
if: runner.os == 'Windows' && matrix.mirror == ''

lib/util.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ end
231231
local function containsTraversalSegment(value)
232232
local normalizedValue = string.gsub(value, "\\", "/")
233233
local lowerValue = string.lower(normalizedValue)
234-
if string.find(lowerValue, "%%2e", 1, false) then
234+
if string.find(lowerValue, "%2e", 1, true) then
235235
return true
236236
end
237237
for segment in string.gmatch(normalizedValue, "[^/]+") do
238-
if string.sub(segment, 1, 2) == ".." then
238+
if segment == ".." then
239239
return true
240240
end
241241
end

0 commit comments

Comments
 (0)