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

WIP: Use default Cabal spec version for cabal init -n #10694

Conversation

cloudyluna
Copy link

Fixes #9687. This PR will make cabal-install use the default cabal spec version for cabal init -n when no --cabal-version=spec_ver is passed. Previously, the version was retrieved at runtime by calling cabal --version and it was assumed that the cabal executable exists in PATH for it to work without returning an error.


QA Notes

Calling /path/to/cabal init -n whenever the cabal executable is not in PATH should correctly initialize a cabal project in the current directory without throwing an exception or returning an error.

  • In the generated .cabal file, the cabal-version key value must be the default Cabal specification version, similar to that if cabal init -n --simple was used instead. Currently, the current default spec version is 3.0.

@cloudyluna cloudyluna changed the title WIP: Fix cabal init -n failure when cabal executable is not found in PATH WIP: Use default Cabal spec version for cabal init --non-interactive Jan 1, 2025
@cloudyluna cloudyluna changed the title WIP: Use default Cabal spec version for cabal init --non-interactive WIP: Use default Cabal spec version for cabal init -n Jan 1, 2025
@cloudyluna cloudyluna closed this Jan 1, 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.

cabal init -n fails when cabal is not in $PATH
1 participant