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

Make 'Install CLI' usable without admin privileges #10065

Open
1 task done
liamdawson opened this issue Apr 2, 2024 · 1 comment
Open
1 task done

Make 'Install CLI' usable without admin privileges #10065

liamdawson opened this issue Apr 2, 2024 · 1 comment
Labels
cli Command-line interface feedback enhancement [core label] good first issue Issue suitable for first-time contributors macOS Platform-specific feedback for macOS behaviors, features, design, etc security & privacy Data privacy issue, security vulnerabilities, etc

Comments

@liamdawson
Copy link

liamdawson commented Apr 2, 2024

Check for existing issues

  • Completed

Describe the feature

When I attempt to install the CLI without admin privileges, I would either like it to fall back to an approach that uses my home directory (e.g. install to ~/.local/bin or ~/bin), or to provide instructions on how to achieve this for myself.

Currently, it errors with:

error creating CLI symlink

Caused by:
error running osascript. Please try again.

I can install zed using Homebrew into ~/Applications, and Homebrew manages an appropriate symlink at /opt/homebrew/bin/zed for me, so this is a low priority issue for me.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@liamdawson liamdawson added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Apr 2, 2024
@Moshyfawn Moshyfawn added cli Command-line interface feedback security & privacy Data privacy issue, security vulnerabilities, etc and removed triage Maintainer needs to classify the issue labels Apr 2, 2024
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Apr 2, 2024
@notpeter notpeter added the good first issue Issue suitable for first-time contributors label Jun 27, 2024
@notpeter
Copy link
Member

Yeah, the messaging on that window isn't great:

Screenshot 2024-06-27 at 14 30 11

zed/crates/zed/src/zed.rs

Lines 291 to 293 in a695322

let path = install_cli::install_cli(cx.deref())
.await
.context("error creating CLI symlink")?;

"Error installing zed cli" / "error creating CLI symlink" doesn't tell you where to go / what to do.

The instructions for how to create a directory, symlink, and manipulate your path are likely too much to do inline:

mkdir -p ~/.local/bin
ln -sf /Application/Zed.app/Contents/MacOS/cli ~/.local/bin/zed
# add to ~/.zshrc:
#   export PATH="$HOME/.local/bin/zed:$PATH"
# then respawn your shell

but I've included them here in case someone else finds this error and cannot do the normal
sudo ln -sf /Application/Zed.app/Contents/MacOS/cli /usr/local/bin/zed.

@notpeter notpeter changed the title Support CLI usage without sudo Make 'Install CLI' usable without admin priviledges Aug 28, 2024
@notpeter notpeter added the macOS Platform-specific feedback for macOS behaviors, features, design, etc label Aug 28, 2024
@liamdawson liamdawson changed the title Make 'Install CLI' usable without admin priviledges Make 'Install CLI' usable without admin privileges Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command-line interface feedback enhancement [core label] good first issue Issue suitable for first-time contributors macOS Platform-specific feedback for macOS behaviors, features, design, etc security & privacy Data privacy issue, security vulnerabilities, etc
Projects
None yet
Development

No branches or pull requests

4 participants