Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 25, 2025

The om ci run command was failing when using --override-input arguments due to an incorrect transformation that was adding a flake/ prefix to input names. This caused flake input resolution to fail with errors like:

error: cannot read directory "/Users/srid/.Trash": Operation not permitted
       … while updating the flake input 'flake/vira'

Root Cause

The transform_override_inputs function in crates/nix_rs/src/flake/functions/core.rs was still adding a flake/ prefix to all --override-input arguments:

// OLD (problematic) behavior
if arg == "--override-input" {
    if let Some(next_arg) = iter.next() {
        new_args.push(format!("flake/{}", next_arg));  // ❌ Adds flake/ prefix
    }
}

This transformation was a legacy requirement from nixci that is no longer necessary as of v1.0.0, according to the changelog:

om ci run: The --override-input option mandated flake/ prefix (nixci legacy) which is no longer necessary in this release.

Solution

Simplified the transform_override_inputs function to pass arguments through unchanged:

// NEW (correct) behavior  
fn transform_override_inputs(args: &[String]) -> Vec<String> {
    args.to_vec()  // ✅ No transformation needed
}

This ensures that --override-input vira . stays as --override-input vira . instead of being transformed to --override-input flake/vira ., allowing proper flake input resolution.

The fix has been validated through manual testing and aligns with the existing test case test_haskell_multi_nix_override_input which expects --override-input haskell-flake to work without the flake/ prefix.

Fixes #479.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI assigned Copilot and srid Aug 25, 2025
Copy link
Author

Copilot AI commented Aug 25, 2025

@srid 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Co-authored-by: srid <3998+srid@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] om ci run broken all of a sudden Fix om ci run --override-input broken due to unnecessary flake/ prefix Aug 25, 2025
@Copilot Copilot AI requested a review from srid August 25, 2025 15:05
Copilot finished work on behalf of srid August 25, 2025 15:05
Copy link
Member

@srid srid left a comment

Choose a reason for hiding this comment

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

@copilot Works, but fix the formatting errors (see CI log)

@srid
Copy link
Member

srid commented Aug 25, 2025

Useless

image

@srid srid closed this Aug 25, 2025
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.

om ci run broken all of a sudden
2 participants