Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

startsWith (string) isn't appropriate for versions #248

@andreasabel

Description

@andreasabel

version === 'latest'
? supported[0]
: supported.find(v => v.startsWith(version)) ?? version;

Say the user requests stack-version: 2.1 this will atm resolve to 2.1.3, according to the action's current consciousness about versions:

"stack": [
"2.9.3",
"2.9.1",
"2.7.5",
"2.7.3",
"2.7.1",
"2.5.1",
"2.3.3",
"2.3.1",
"2.1.3",
"2.1.1",

However, once we add stack version 2.11.1, requesting 2.1 will resolve to 2.11.1. Ooops!

I suppose the proper ("Haskell") way to fix this to use a datatype for versions rather than mocking around with strings.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingre: inputsConcerning handling the inputs to this action

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions