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 installer produces broken output on Darwin #915

Closed
ChrisJefferson opened this issue May 25, 2016 · 3 comments
Closed

nix installer produces broken output on Darwin #915

ChrisJefferson opened this issue May 25, 2016 · 3 comments

Comments

@ChrisJefferson
Copy link

When running curl https://nixos.org/nix/install | sh, I get the following output:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1408  100  1408    0     0   3211      0 --:--:-- --:--:-- --:--:--  3214
unpacking Nix binary tarball for x86_64-darwin from `https://nixos.org/releases/nix/nix-1.11.2/nix-1.11.2-x86_64-darwin.tar.bz2'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 29.8M  100 29.8M    0     0  1395k      0  0:00:21  0:00:21 --:--:-- 2040k
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running ‘�� using sudo
Password:

My particular issues if the second-to-last line, by running ?? using sudo (where the ? are unicode 'missing character' symbols, just in case github eats them).

@matthewbauer
Copy link
Member

Are you using Terminal.app or something else? I think it might just be an issue with the ‘ and ’ chars.

https://github.com/NixOS/nix/blob/master/scripts/install-nix-from-closure.sh#L28

@ChrisJefferson
Copy link
Author

Thanks for the pointer to the script.

Short answer:Turn $cmd into ${cmd} on lines 28 and 30, and $dest into ${dest} on line 36.

I problems in both Terminal.app and iTerm2 (my usual terminal). On terminal the input turns into ascii ?, on iTerm2 I get the weird boxes.

The shell seem to be mis-interpreting $cmd’ . For the sake of interest / completeness, here are some commands on my machine, and what they output (both terminals)

    echo "‘’"  >&2
    echo "‘$cmd’ " >&2
    echo "‘${cmd}’ " >&2
    echo "directory $dest does not exist; creating it by running ‘${cmd}’ using sudo" >&2

‘’
‘��
‘mkdir -m 0755 /nix && chown caj /nix’
directory /nix does not exist; creating it by running ‘mkdir -m 0755 /nix && chown caj /nix’ using sudo

@domenkozar
Copy link
Member

Fixed in #910

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

No branches or pull requests

3 participants