Giter Club home page Giter Club logo

Comments (13)

marchersimon avatar marchersimon commented on August 22, 2024 3

No, we didn't take care of this yet. Here's more info. It will just stay there until you manually delete it. But it has nothing to do with this issue.

from tldr-c-client.

lwpie avatar lwpie commented on August 22, 2024 2

#21

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024 2

Update: I figured out the issue. In Linux (and probably macOS too) /tmp has it's own filesystem called tmpfs. We now try to rename the tldr directory in /tmp/tldrXXXX/tldr-main to ~/.tldrc/tldr, which doesn't work, because the rename() command doesn't support that. It set's the errno code 18 - Invalid cross-device link. This issue even existed in the code more than 5 years ago. Honestly, I'm wondering how this worked at all...

I'm currently making a PR to replace the rename() function to a copy() and delete().

from tldr-c-client.

glawrence avatar glawrence commented on August 22, 2024 2

I started by checking I was still seeing the issue:

Geoffs-MacBook-Pro:~ $ tldr -u
Error: Could Not Rename: /tmp/tldrYmdBuU/tldr to /Users/xxxxx/.tldrc/tldr/
Geoffs-MacBook-Pro:~ $ brew install tldr --HEAD
Updating Homebrew...
==> Auto-updated Homebrew!Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).

Error: tldr 1.4.0 is already installed
To install HEAD, first run:
  brew unlink tldr
Geoffs-MacBook-Pro:~ $ brew unlink tldr
Unlinking /usr/local/Cellar/tldr/1.4.0... 5 symlinks removed.
Geoffs-MacBook-Pro:~ $ brew install tldr --HEAD
==> Cloning https://github.com/tldr-pages/tldr-c-client.git
Cloning into '/Users/xxxxx/Library/Caches/Homebrew/tldr--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> make PREFIX=/usr/local/Cellar/tldr/HEAD-2faf09e install
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/tldr/HEAD-2faf09e: 10 files, 82.1KB, built in 11 seconds
Removing: /Users/xxxxx/Library/Caches/Homebrew/tldr--1.4.0... (14.7KB)
Geoffs-MacBook-Pro:~ $ tldr -u
Successfully updated local database
Geoffs-MacBook-Pro:~ $ 

I needed to unlink, but after that it worked, which is great! Thank you very much.

Not critical but tldr -v returns tldr v1.3.0 (v1.4.0-2-g2faf09e). Oh and I checked in the .tldrc directory and found both tldr-mainand tldr-masterwhich I believe is as expected.

If that was not what you wanted, or I did something wrong, please just ask.

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024 1

Thanks, that was exactly what I wanted to know. We will create a new release with the fix soon, so you can get the new version without the --HEAD flag.

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024 1

I just released the fix. Thanks for your help @glawrence

from tldr-c-client.

CleanMachine1 avatar CleanMachine1 commented on August 22, 2024

This is almost definitely #59

Did the fix work from #21

from tldr-c-client.

glawrence avatar glawrence commented on August 22, 2024

I tried the fix at #21 (comment) which did not work for me. However I note that, as above tldr -v -u shows main.zip and the instructions on #21 I just linked to refer to master.zip

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024

This is really strange, because I made #59 to fix exactly this issue and it worked for me. Now, I'm getting the same error.

from tldr-c-client.

glawrence avatar glawrence commented on August 22, 2024

Argh, how annoying @marchersimon ! I guess on the plus side, from our point of view, it is useful you can reproduce the issue.... Happy to try and help by testing stuff on macOS

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024

The main reason this is failing is, because the archive we download is called main.zip, because it's coming from the main branch. The archive contains the directory tldr-main/, so when we extract main.zip, we get tldr-main, which the program doesn't expect. I'll keep you up to date.

from tldr-c-client.

glawrence avatar glawrence commented on August 22, 2024

Will it remove ~/.tldrc/tldr-master as part of the process? I am guessing that's not needed, although removing it might stop tldr from working, I guess

from tldr-c-client.

marchersimon avatar marchersimon commented on August 22, 2024

@glawrence the fix for macOS is merged now. Could you please verify that it's working by updating your client using the --HEAD opption?

from tldr-c-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.