(chore): Fix current_version warnings

This commit is contained in:
Hsiao-nan Cheung 2022-12-10 23:52:48 +08:00
parent 9208535db0
commit 8730cb9c71
No known key found for this signature in database
GPG Key ID: A97377F8EF10E3F2
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
"pre_install": [ "pre_install": [
"$file = 'config.lua'", "$file = 'config.lua'",
"$lua = (versiondir 'lua' 'current' $global) -replace \"\\\\\", '/'", "$lua = (versiondir 'lua' 'current' $global) -replace \"\\\\\", '/'",
"$v1 = (current_version 'lua' $global) -replace \"^(\\d.\\d).*\", '$1'", "$v1 = (Select-CurrentVersion 'lua' $global) -replace \"^(\\d.\\d).*\", '$1'",
"$v2 = $v1 -replace \"[.]\", ''", "$v2 = $v1 -replace \"[.]\", ''",
"$rocks = \"$(versiondir 'luarocks' 'current' $global)\\rocks\" -replace \"\\\\\", \"/\"", "$rocks = \"$(versiondir 'luarocks' 'current' $global)\\rocks\" -replace \"\\\\\", \"/\"",
"if (!(Test-Path \"$persist_dir\\$file\")) {", "if (!(Test-Path \"$persist_dir\\$file\")) {",

View File

@ -32,9 +32,9 @@
"movedir \"$dir\\Setup\\bin\\x64\" \"$dir\\bin\\x64\" | Out-Null", "movedir \"$dir\\Setup\\bin\\x64\" \"$dir\\bin\\x64\" | Out-Null",
"movedir \"$dir\\Setup\\library\" \"$dir\\library\" | Out-Null", "movedir \"$dir\\Setup\\library\" \"$dir\\library\" | Out-Null",
"Remove-Item \"$dir\\_tmp\", \"$dir\\Setup\", \"$dir\\$fname\" -Force -Recurse", "Remove-Item \"$dir\\_tmp\", \"$dir\\Setup\", \"$dir\\$fname\" -Force -Recurse",
"if (Test-Path (appdir 'rtools' $global)) {", "if (Test-Path (appdir 'rtools40' $global)) {",
" $renvloc = \"$dir\\etc\\Renviron.site\"", " $renvloc = \"$dir\\etc\\Renviron.site\"",
" $rtoolsloc = versiondir 'rtools' (current_version 'rtools' $global) $global", " $rtoolsloc = versiondir 'rtools40' (Select-CurrentVersion 'rtools40' $global) $global",
" if (Test-Path $renvloc) {", " if (Test-Path $renvloc) {",
" $renv = Get-Content $renvloc -Encoding ASCII", " $renv = Get-Content $renvloc -Encoding ASCII",
" } else {", " } else {",