Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/setup-python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function resolveVersionInputFromDefaultFile(): string[] {
function resolveVersionInput() {
let versions = core.getMultilineInput('python-version');
const versionFile = core.getInput('python-version-file');
const versionStrategy = core.getInput('python-version-strategy');

if (versions.length) {
if (versionFile) {
Expand All @@ -73,6 +74,9 @@ function resolveVersionInput() {
}
}

if(versionStrategy == "approximate")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to make the versionStrategy directly take ~ as an argument, so that it can be used for all kinds of version overrides.

Not sure if there are uses for overriding the strategy to ^ however.

versions.map(v => v.replace(">=", "~").replace("^", "~"));

return versions;
}

Expand Down