px: Fix px.ini creation for persist (#5610)

* px: fix px.ini creation for persist directive

* px: remove unnecessary env_set

* px: fix pre_install to stop overwriting

---------

Co-authored-by: Loïc PÉRON <loic.peron@inetum.com>
Co-authored-by: tech189 <dlloyd189@gmail.com>
This commit is contained in:
Loïc PÉRON 2024-04-17 16:08:08 +02:00 committed by GitHub
parent 611cbd75c8
commit fd0c4edae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,10 @@
"hash": "0e492431ef836091d34f44a6de8caf2a0aaef1737ba7b8202fa54285a5db4101" "hash": "0e492431ef836091d34f44a6de8caf2a0aaef1737ba7b8202fa54285a5db4101"
} }
}, },
"pre_install": [
"if (Test-Path -PathType Container \"$persist_dir\\px.ini\") { Remove-Item \"$persist_dir\\px.ini\" } # removes folder px.ini if exists",
"if (!(Test-Path \"$persist_dir\\px.ini\")) { New-Item \"$dir\\px.ini\" | Out-Null } # creates config file px.ini if doesn't exist"
],
"bin": "px.exe", "bin": "px.exe",
"persist": "px.ini", "persist": "px.ini",
"checkver": "github", "checkver": "github",