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

unpack-channel.nix: fix 'mv' corner case #1252

Merged
merged 1 commit into from
Feb 27, 2017

Conversation

bjornfor
Copy link
Contributor

unpack-channel.nix fails if the tarball contains a directory named the
same as the channel:

  mv: cannot move 'nixpkgs' to a subdirectory of itself, '.../nixpkgs'

This commit fixes that by not moving the directory if it already has the
correct name.

unpack-channel.nix fails if the tarball contains a directory named the
same as the channel:

  mv: cannot move 'nixpkgs' to a subdirectory of itself, '.../nixpkgs'

This commit fixes that by not moving the directory if it already has the
correct name.
@domenkozar
Copy link
Member

Looks like a (better?) duplicate of https://github.com/NixOS/nix/pull/1192/files

@bjornfor
Copy link
Contributor Author

nullglob is bashism, so yes it can be argued that this PR is better :-)

@bjornfor
Copy link
Contributor Author

On the other hand, if there is whitespace in the toplevel directory of "nixexprs.tar.xz", this PR might error out quite ugly.

@bjornfor bjornfor deleted the channel-rename-fix branch February 27, 2017 12:14
@domenkozar
Copy link
Member

Should be a punshment for anyone using whitespace in channels :-)

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.

None yet

2 participants