diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ad97e5..92a5908 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -181,8 +181,8 @@ jobs: - uses: ./ with: cache: false - pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.13.0/pixi-x86_64-unknown-linux-musl - - run: pixi --version | grep -q "pixi 0.13.0" + 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.14.0" custom-manifest-path: strategy: diff --git a/dist/index.js b/dist/index.js index beefb26..bc358d5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -78874,14 +78874,23 @@ var 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) + core4.warning("pixi versions < `v0.14.0` do not support the --frozen option for pixi list."); + if (options.locked) + core4.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) { core4.debug(`Listing environment ${environment}`); - await core4.group(`pixi list -e ${environment}`, () => execute(pixiCmd(`list -e ${environment}`))); + await core4.group(`pixi ${command} -e ${environment}`, () => execute(pixiCmd(`${command} -e ${environment}`))); } return Promise.resolve(); } else { - return core4.group("pixi list", () => execute(pixiCmd("list"))); + return core4.group(`pixi ${command}`, () => execute(pixiCmd(command))); } }; var generateInfo = () => core4.group("pixi info", () => execute(pixiCmd("info"))); diff --git a/src/main.ts b/src/main.ts index 577ecad..41528f5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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))) } }