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

nix-prefetch-git: fix handling of submodules with spaces #39957

Merged
merged 1 commit into from May 4, 2018

Conversation

lionello
Copy link
Contributor

@lionello lionello commented May 3, 2018

Motivation for this change

The script would parse the output of git submodule status but
didn't handle paths with spaces in them. This would result in the
following error when trying to determine the URL of the submodule:

error: key does not contain a section: .url

This fixes #39956

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The script would parse the output of `git submodule status` but
didn't handle paths with spaces in them. This would result in the
following error when trying to determine the URL of the submodule:

error: key does not contain a section: .url
@lionello lionello force-pushed the fix/nix-prefetch-git-spaces branch from bdbc629 to 9fe26ee Compare May 4, 2018 15:17
@lionello
Copy link
Contributor Author

lionello commented May 4, 2018

Fixed the case raised by @adisbladis when a module name has two or more consecutive spaces.

@adisbladis adisbladis merged commit f786072 into NixOS:master May 4, 2018
@adisbladis
Copy link
Member

Thanks for this fix and congratulations on your first nixpkgs PR! 🎉

@lionello lionello deleted the fix/nix-prefetch-git-spaces branch May 4, 2018 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nix-prefetch-git does not handle submodules with spaces
4 participants