fix(windows): respect flag lengths

This commit is contained in:
Jan De Dobbeleer 2023-05-10 19:56:44 +02:00 committed by Jan De Dobbeleer
parent 221cd7bad2
commit ddd4ecafc9
3 changed files with 5 additions and 5 deletions

View file

@ -32,21 +32,21 @@ jobs:
"packageUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${{ github.event.inputs.version }}/install-amd64.exe",
"languages":["en"],
"architectures":["X64"],
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=winstore",
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=ws",
"isSilentInstall":false
},
{
"packageUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${{ github.event.inputs.version }}/install-arm64.exe",
"languages":["en"],
"architectures":["Arm64"],
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=winstore",
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=ws",
"isSilentInstall":false
},
{
"packageUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${{ github.event.inputs.version }}/install-386.exe",
"languages":["en"],
"architectures":["X86"],
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=winstore",
"installerParameters":"/VERYSILENT /CURRENTUSER /INSTALLER=ws",
"isSilentInstall":false
}
]

View file

@ -59,7 +59,7 @@ func getLatestVersion(env platform.Environment) (string, error) {
// The upgrade check is only performed every other week.
func Notice(env platform.Environment) (string, bool) {
// never validate when we install using the Windows Store
if env.Getenv("POSH_INSTALLER") == "winstore" {
if env.Getenv("POSH_INSTALLER") == "ws" {
return "", false
}
// do not check when last validation was < 1 week ago

View file

@ -28,7 +28,7 @@ func TestCanUpgrade(t *testing.T) {
{Case: "Outdated Darwin", Expected: true, CurrentVersion: "3.0.0", LatestVersion: "v3.0.1", GOOS: platform.DARWIN},
{Case: "Cached", Cache: true},
{Case: "Error", Error: fmt.Errorf("error")},
{Case: "Windows Store", Installer: "winstore"},
{Case: "Windows Store", Installer: "ws"},
}
for _, tc := range cases {