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

zsh_setup fails when calling sed and exits immediately #121

Open
maxcurzi opened this issue Dec 9, 2022 · 4 comments
Open

zsh_setup fails when calling sed and exits immediately #121

maxcurzi opened this issue Dec 9, 2022 · 4 comments

Comments

@maxcurzi
Copy link

maxcurzi commented Dec 9, 2022

calling source zsh_setup.sh from a zsh prompt
and giving the OpenAI keys suddenly makes the prompt go away and the setup fails.
After some investigation, it looks like there is an error at: this line (in zsh_setup.sh:46)

# Remove previous settings
sed -i '' '/### Codex CLI setup - start/,/### Codex CLI setup - end/d' $zshrcPath

The error is
sed: can't read /### Codex CLI setup - start/,/### Codex CLI setup - end/d: No such file or directory

I already have ~/.zshrc, so this is a different issue from #115

If I comment that line (the one that calls sed), then the setup completes successfully.

@sangemaru
Copy link

Same issue on Ubuntu 20.04

@AndersSteenNilsen
Copy link

Same

# print info about my ubuntu installation
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

@Sahil-Bagdi
Copy link

I also faced the same issue until I solved it by experimenting.
You just need to edit the zsh_setup.sh a bit
On Line 46 => sed -i '' '/### Codex CLI setup - start/,/### Codex CLI setup - end/d' $zshrcPath
Replace it with => sed -i '/### Codex CLI setup - start/,/### Codex CLI setup - end/d' $zshrcPath

Very small change just remove the empty colons that's it, Problem will now be solved

WORKED FOR ME!

@Weltolk
Copy link

Weltolk commented Apr 13, 2023

This pr should solve the problem:

#133

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

5 participants