Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: respect frozen/locked inputs for pixi list #94

Merged
merged 4 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
- uses: ./
with:
cache: false
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.13.0/pixi-x86_64-unknown-linux-musl
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
- run: pixi --version | grep -q "pixi 0.13.0"
pavelzw marked this conversation as resolved.
Show resolved Hide resolved

custom-manifest-path:
Expand Down
13 changes: 11 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,25 @@ const generateList = async () => {
)
return Promise.resolve()
}
let command = 'list'
if (
'version' in options.pixiSource &&
options.pixiSource.version !== 'latest' &&
options.pixiSource.version < 'v0.14.0'
) {
if (options.frozen) core.warning('pixi versions < `v0.14.0` do not support the --frozen option for pixi list.')
if (options.locked) core.warning('pixi versions < `v0.14.0` do not support the --locked option for pixi list.')
} else {
command = `${command}${options.frozen ? ' --frozen' : ''}${options.locked ? ' --locked' : ''}`
}
if (options.environments) {
for (const environment of options.environments) {
core.debug(`Listing environment ${environment}`)
await core.group(`pixi list -e ${environment}`, () => execute(pixiCmd(`list -e ${environment}`)))
await core.group(`pixi ${command} -e ${environment}`, () => execute(pixiCmd(`${command} -e ${environment}`)))
}
return Promise.resolve()
} else {
return core.group('pixi list', () => execute(pixiCmd('list')))
return core.group(`pixi ${command}`, () => execute(pixiCmd(command)))
}
}

Expand Down
Loading