Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Enables setting pixi global configuration (e.g., run-post-link-scripts = "insecure") directly in the action instead of requiring manual workarounds.

Changes

  • action.yml: New configuration input accepting TOML format
  • src/main.ts: writePixiConfig() function with TOML validation and error handling
    • Validates TOML syntax before write using smol-toml parser
    • Throws error if ~/.pixi/config.toml already exists (prevents overwriting existing configurations)
    • Executes after pixi installation, before authentication
  • src/options.ts: Added configuration field to input/options types
  • test.yml: Cross-platform integration tests (Ubuntu, macOS, Windows)

Usage

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

Configuration is written to ~/.pixi/config.toml and applies to all subsequent pixi commands.

Note: The action will fail with an error if a config file already exists at ~/.pixi/config.toml. Remove any existing file before using this feature.

Original prompt

This section details on the original issue you should resolve

<issue_title>Allow specifying pixi global configuration</issue_title>
<issue_description>I would like to enable run-post-link-scripts = "insecure" in our CI. It would be easiest if this could be set directly in the action. </issue_description>

Comments on the Issue (you are @copilot in this section)

@pavelzw This would only work if we expose _all_ global configuration endpoints. A workaround for now would be to `cat <Something like this

uses: prefix-dev/setup-pixi@...
with:
  configuration: |
    run-post-link-scripts: "false"
```</body></comment_new>
<comment_new><author>@pavelzw</author><body>
I will eventually get to implementing it. If you want it quicker, I'm open for PRs as well.</body></comment_new>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 28, 2026 09:54
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>
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 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)}`)
}
Copy link
Collaborator

@pavelzw pavelzw Jan 28, 2026

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

Co-authored-by: pavelzw <29506042+pavelzw@users.noreply.github.com>
Copilot AI requested a review from pavelzw January 28, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying pixi global configuration

2 participants