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 2 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
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.

20 changes: 15 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@
if (options.environments) {
for (const environment of options.environments) {
core.debug(`Installing environment ${environment}`)
const command = `install -e ${environment}${options.frozen ? ' --frozen' : ''}${
options.locked ? ' --locked' : ''
}`
const command = `install -e ${environment}${options.frozen ? ' --frozen' : ''}${options.locked ? ' --locked' : ''

Check failure on line 61 in src/main.ts

View workflow job for this annotation

GitHub Actions / build

Insert `⏎············`
}`

Check failure on line 62 in src/main.ts

View workflow job for this annotation

GitHub Actions / build

Delete `··`
await core.group(`pixi ${command}`, () => execute(pixiCmd(command)))
}
} else {
Expand All @@ -86,14 +85,25 @@
)
return Promise.resolve()
}
var command = 'list'

Check failure on line 88 in src/main.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected var, use let or const instead
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' : ''}`
wpbonelli marked this conversation as resolved.
Show resolved Hide resolved
}
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