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

Fix bug No such file or directory in install_update_linux.sh #616

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zcorn2017
Copy link

Create the directory if it does not exist.
By this fix, we can avoid the error:
install: failed to access ‘~/.local/bin’: No such file or directory

Create the directory if it does not exist.
In this way, we can prevent the error:
`install: failed to access ‘~/.local/bin’: No such file or directory`
@mark2185
Copy link
Contributor

That's odd, install -D should suffice. We had the same issue on lazygit, but -D is present here already.

@zcorn2017
Copy link
Author

That's odd, install -D should suffice. We had the same issue on lazygit, but -D is present here already.

This issue happens when the .config folder does not exist, which is typical after a fresh install.
install -D only creates the folder when the parent folder .config exists.

@mark2185
Copy link
Contributor

This issue happens when the .config folder does not exist, which is typical after a fresh install. install -D only creates the folder when the parent folder .config exists.

I presume you meant .local instead of .config, but the manpages say that -D creates all of the leading components:

 -D     create all leading components of DEST except the last, or all components of --target-directory, then copy SOURCE to DEST

And I've tried it, and it seems to be working?

$> install -Dm 755 lazydocker -t "/tmp/this/does/not/exist"
$> ls /tmp/this/does/not/exist/lazydocker
/tmp/this/does/not/exist/lazydocker

@zcorn2017
Copy link
Author

This issue happens when the .config folder does not exist, which is typical after a fresh install. install -D only creates the folder when the parent folder .config exists.

I presume you meant .local instead of .config, but the manpages say that -D creates all of the leading components:

 -D     create all leading components of DEST except the last, or all components of --target-directory, then copy SOURCE to DEST

And I've tried it, and it seems to be working?

$> install -Dm 755 lazydocker -t "/tmp/this/does/not/exist"
$> ls /tmp/this/does/not/exist/lazydocker
/tmp/this/does/not/exist/lazydocker

It turns out that I ran the setup script on a relatively old shared server. The install version is 8.22 (released in 2013), which does not behave as the same as the newer ones (I think it caused something (a bug?) wrong when -D was used in combination with -t). I suggest adding this line to improve the compatibility. Thanks!

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.

2 participants