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

Install fails on Ubuntu 18.04 and 18.10 #7492

Closed
sabrehagen opened this issue Jan 3, 2019 · 3 comments
Closed

Install fails on Ubuntu 18.04 and 18.10 #7492

sabrehagen opened this issue Jan 3, 2019 · 3 comments

Comments

@sabrehagen
Copy link
Contributor

sabrehagen commented Jan 3, 2019

I'm finding the oh-my-zsh install script fails with exit 1 and no error message when installing on ubuntu:18.04 and ubuntu:18.10.

FROM ubuntu:18.10
ENV TERM screen-256color

RUN apt update && apt install -y curl zsh git

RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
docker build -t ubuntu-zsh .
...
Cloning into '/root/.oh-my-zsh'...
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc
The command '/bin/sh -c sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"'
  returned a non-zero code: 1

I've added the command

ENV TERM screen-256color

which silences the following error:

tput: No value for $TERM and no -T specified

It appears to be non-fatal.

@sabrehagen
Copy link
Contributor Author

sabrehagen commented Jan 3, 2019

By console logging I found out it's crashing on this line.

FROM ubuntu:18.10

RUN apt update
RUN apt install -y curl zsh git

RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/sabrehagen/oh-my-zsh/cabf1ef50dd10084d91c2c4e5386821f5bb1be79/tools/install.sh)"
docker build -t ubuntu-zsh .
...
Using the Oh My Zsh template file and adding it to ~/.zshrc
before
The command '/bin/sh -c sh -c "$(curl -fsSL https://raw.githubusercontent.com/sabrehagen/oh-my-zsh/cabf1ef50dd10084d91c2c4e5386821f5bb1be79/tools/install.sh)"'
   returned a non-zero code: 1

@mcornella
Copy link
Member

Try with the following change to install.sh:

   # If this user's login shell is not already "zsh", attempt to switch.
-  TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
+  TEST_CURRENT_SHELL=$(basename "$SHELL")

@sabrehagen
Copy link
Contributor Author

Yes, install succeeds with that change.

sgabe pushed a commit to sgabe/oh-my-zsh that referenced this issue Feb 12, 2019
atsuya pushed a commit to atsuya/oh-my-zsh that referenced this issue Jun 9, 2019
dukegod pushed a commit to dukegod/oh-my-zsh that referenced this issue Jul 16, 2019
chihchun pushed a commit to chihchun/oh-my-zsh that referenced this issue Aug 6, 2019
sgpthomas pushed a commit to sgpthomas/oh-my-zsh that referenced this issue Nov 22, 2019
lewg pushed a commit to lewg/oh-my-zsh that referenced this issue Nov 25, 2019
spiliopoulos pushed a commit to spiliopoulos/zsh-config that referenced this issue Jun 17, 2020
crdant referenced this issue in crdant/oh-my-zsh-custom Dec 30, 2020
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

2 participants