Skip to content

feat: Add configuration input for pixi global settings - #248

Merged
pavelzw merged 10 commits into
mainfrom
copilot/allow-global-configuration-pixi
Nov 1, 2026
Merged

pavelzw merged 10 commits into
mainfrom
copilot/allow-global-configuration-pixi

Conversation

Copilot AI commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds a configuration input to set global pixi configuration (e.g. run-post-link-scripts = "insecure") directly in the action.

- uses: prefix-dev/setup-pixi@v0.11.3
  with:
    configuration: |
      run-post-link-scripts = "insecure"

Behavior

  • The input is validated as TOML and written verbatim to $PIXI_HOME/config.toml (~/.pixi/config.toml by default), right after pixi is installed and before any pixi command runs.
  • If the config file already exists, the action fails and does not touch the existing file (atomic create with wx).
  • With post-cleanup: true (default), the config file written by the action is removed in the post step. A config that already existed is never removed.

Tests

  • configuration: writes config on Linux/macOS/Windows, checks it was written verbatim and that pixi config list sees it
  • configuration-already-exists: action fails, existing file stays unchanged
  • configuration-invalid-toml: action fails, no file is written

Closes #224

Copilot AI changed the title [WIP] Add option to specify pixi global configuration Add configuration input for pixi global settings Jan 28, 2026
Copilot AI requested a review from pavelzw January 28, 2026 10:05
Comment thread src/main.ts Outdated
Comment on lines +39 to +45
let parsedNewConfig: Record<string, unknown>
try {
parsedNewConfig = parse(configuration)
core.debug(`Parsed configuration: ${JSON.stringify(parsedNewConfig)}`)
} catch (error) {
throw new Error(`Invalid TOML configuration: ${error instanceof Error ? error.message : String(error)}`)
}

@pavelzw pavelzw Jan 28, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot let's just throw an error when the config file already exists. we don't allow creating a configuration file when it already exists

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot let's just throw an error when the config file already exists. we don't allow creating a configuration file when it already exists

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to throw an error when config file already exists instead of merging. Commit fb4aedb.

Copilot AI and others added 7 commits November 1, 2026 14:52
Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
…p config in post step

- Fix existing-file check swallowing its own error (config was silently overwritten)
- Write configuration verbatim (keeps comments/formatting) with atomic 'wx' create
- Write to $PIXI_HOME/config.toml if PIXI_HOME is set
- Remove the written config file in the post-cleanup step
- Fix tests (python version, checkout pin) and add negative tests
- Rebuild dist
@pavelzw
pavelzw force-pushed the copilot/allow-global-configuration-pixi branch from fb4aedb to 6dea66d Compare November 1, 2026 13:58
@pavelzw
pavelzw marked this pull request as ready for review November 1, 2026 14:22
@pavelzw pavelzw added the enhancement New feature or request label Nov 1, 2026
@pavelzw pavelzw changed the title Add configuration input for pixi global settings feat: Add configuration input for pixi global settings Nov 1, 2026
@pavelzw
pavelzw merged commit 9936258 into main Nov 1, 2026
205 checks passed
@pavelzw
pavelzw deleted the copilot/allow-global-configuration-pixi branch November 1, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying pixi global configuration

2 participants