Git Product home page Git Product logo

Comments (4)

AlanSl avatar AlanSl commented on September 26, 2024

I think I've figured it out - I can replicate it by causing a yalc package directory to have a .DS_Store file with a creation date more recent than any of the version directories.

Example replication steps (on a Mac):

  • yalc add some package - it works
  • Delete the .DS_Store file in that package's directory of version directories
  • Regenerate it (for example, Get Info, then tick and untick "Locked")
  • yalc add the same package again - this time, it fails on trying to cd into .DS_store.

So it looks like the problem is, the function yalc add uses to find the latest version is just taking all the contents of the directory, getting the most recent, and assuming it's a version directory. 99% of the time this works fine, but if for whatever reason some system file like .DS_Store comes to be the most recent item in the directory, this crash happens.

Suggested fix: filter the array of directory contents to be only directories before finding the newest and cding into it.

from yalc.

yevgeniy-belov avatar yevgeniy-belov commented on September 26, 2024

@AlanSl Did you find a workaround for this issue?

from yalc.

AlanSl avatar AlanSl commented on September 26, 2024

Not really. It might be possible to work around by forcing the version folders to have a more recent created date than .DS_Store, e.g. by deleting the published versions then yalc publish again?

from yalc.

yevgeniy-belov avatar yevgeniy-belov commented on September 26, 2024

Not really. It might be possible to work around by forcing the version folders to have a more recent created date than .DS_Store, e.g. by deleting the published versions then yalc publish again?

Yeah, it might work but it feels like it's going to be cumbersome and unstable...
Im wondering if there is a fork addressing this.

from yalc.

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.