Giter Club home page Giter Club logo

Comments (7)

tmaone avatar tmaone commented on May 16, 2024 1

I'm sorry to say and no offence really. This init script,... should ... just disappear from the face of this universe. A couple of hundred meticulously collected and configured Alfred extensions -> kaboomed. Not entirely sure even now what really happened. Only clue I currently I have is a package that symlinked to Alfred's preferences workflow folder, pointing to the void. Perhaps not sanely handling exceptions? Oh well. I wouldn't mind all that much, if I wasn't in the middle of a recovery process with no recent reliable copy of that config directory.

ps I'm not reporting a bug however (it might not even be due to this commit anyway), just sharing an experience. 🌌

from alfy.

SamVerschueren avatar SamVerschueren commented on May 16, 2024

Should we use execa for this? I was thinking about using listr which could provide us with a nice UI. But then again, for now we only have the linking part. This would perhaps give us too much overhead?

from alfy.

sindresorhus avatar sindresorhus commented on May 16, 2024

I think execa is enough for now. If we another step, we can consider listr.

from alfy.

SamVerschueren avatar SamVerschueren commented on May 16, 2024

I was thinking about calling alfred-link programmatically like in the cli. But then again, if something changes, we would have to make the change here as well while the cli will (hopefully) always be just callable.

from alfy.

sindresorhus avatar sindresorhus commented on May 16, 2024

Yup, easier just to spawn the CLI.

from alfy.

SamVerschueren avatar SamVerschueren commented on May 16, 2024

This init script,... should ... just disappear from the face of this universe.

Sorry to hear that. We've really put a lot of effort into all of this to give people a good and nice development experience with an easy to release and update process for the users of the workflows as well. But bugs are inevitable, so if this is really caused by this script, we should try to fix this asap.

Just to understand what happened. You installed a workflow which screwed up your other Alfred workflows? Which workflow did you install? What happened after you installed the workflow? Have you tried removing the symlink first? Do your workflows still work and is it the Alfred screen that just stays blank? We need more information if you want us to look into it.

from alfy.

tmaone avatar tmaone commented on May 16, 2024

Apologies for sounding that frustrated in the morning, we can probably all relate to such events, while when sanity prevails again, they can as well become history. But sure, let's be reasonable here and with that aside, let's try to figure out what might have happened and the actual issue.

Because as I said I just couldn't figure exactly what was going on, since just in a snap all rm'ed and disappeared, I'll try to walk through with the details I have.

With my previous Darwin dev machine reaching its end, I was migrating $HOME and user accounts to a new one. At the same time I also changed $USER. So, while at Alfred, some workflows as usual did not behave well, and I was looking at them. I was at some point at this. Despite not questioning why it existed in my workflows folder in the first place, and while trying to revive it, saw a fairly unusual package.json literally like this:

{
    "alfy": ""
    "another_ext: ""
    "one_more_ext": ""
}

Then, the next thing I tried to install its dependencies and refresh the node modules, manually. Next thing, I install alfy, I think first /w --save and after with -g, while then If I remember I think I tried to alfy-init it from there to get it started. Then, next thing I saw, was the Alfred workflows window, gradually emptying, and then after the shock, I look into the terminal and I see a symlink where the real workflows where, pointing to the nested location the workflow existed before (and not in any node_modules sub-dir) i.e.:
/Alfred.alfredpreferences/worflows -> /Users/USER/config/Alfred.alfredpreferences/workflows/workflow_name

These are the steps done. Now to your questions: I tried to fix an installed (but not working) alfred workflow, which was not installed through npm! rather normally, but I saw alfy as one of its dependencies and thought to help it out. Yes, it messed the Alfred.alfredpreferences/workflows folder. Link is found above. Yes indeed, then tried, to rm the symlink which gave nothing, then I mkdir the workflows folder, and started looking to replicate the list I had installed. Luckily! The configurations are saved in a nested Library folder and not in the alfredpreferences, so as I reinstalled a few of the important ones I remembered they immediately picked up the configurations. So far I have replicated almost 80% of the workflows and their configs I had previously, so let's start with this if we can figure what went on, and I'll try to grab more details while being at it. Most importantly the different versions that were there.

--
Post-comment additions:

The actual workflow in discussion is not important; and I'm not sure why I even bothered with it. I think it never worked. However, revealed some interesting destructive behaviour, which I guess shouldn't happen, or handled in some way.

from alfy.

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.