Git Product home page Git Product logo

Comments (15)

sindresorhus avatar sindresorhus commented on May 20, 2024

What output do you get if you add in foo=$($(echo $SHELL) -ic 'echo $PATH');echo $foo in the workflow?

from alfred-emoj.

codeincontext avatar codeincontext commented on May 20, 2024

/usr/bin:/bin:/usr/sbin:/sbin:/Users/adz/.fzf/bin

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

Hmm, weird.

Can you try replacing the script with:

PATH=$($(echo $SHELL) -ic 'echo $PATH'):/usr/local/bin:$PATH
node index.js "$1"

What's the output when running these commands in your Terminal (not in the Alfred workflow):

  • echo $SHELL
  • bash --version
  • zsh --version
  • echo $PATH

from alfred-emoj.

codeincontext avatar codeincontext commented on May 20, 2024

That works

Don't think it should matter but FWIW I normally use Fish

Adams-MBP-4:~ adz$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.
Adams-MBP-4:~ adz$ zsh --version
zsh 5.0.8 (x86_64-apple-darwin15.0)
Adams-MBP-4:~ adz$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

So Fish is your default shell? Do you know the Fish equivalent of echo $($(echo $SHELL) -ic 'echo $PATH')? (That snippets spawns your default shell interactively and get's your $PATH.) I would guess it doesn't work because you default shell is Fish and it tries to spawn Fish with unsupported flags and syntax.

0.1.1 is out with the fix btw. http://www.packal.org/workflow/emoj

from alfred-emoj.

codeincontext avatar codeincontext commented on May 20, 2024

I should have been clearer; bash is still my default shell for compatibility reasons, but I don't use it often and it may not be configured in a typical way. I think Alfred hard codes /bin/bash anyway

And cool, thanks sir

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

Ok, cool :)

Last favor. Could you replace it with this and see if it still works?

eval $(/usr/libexec/path_helper -s)
export PATH=/usr/local/bin:$($(echo $SHELL) -ic 'echo $PATH'):$PATH

node index.js "$1"

Just want to ensure I don't break it again.

from alfred-emoj.

codeincontext avatar codeincontext commented on May 20, 2024

Yep, still works 🔜👌👍😌🔄🙌

On Sun, Jun 26, 2016 at 10:36 PM Sindre Sorhus [email protected]
wrote:

Ok, cool :)

Last favor. Could you replace it with this and see if it still works?

eval $(/usr/libexec/path_helper -s)export PATH=/usr/local/bin:$($(echo $SHELL) -ic 'echo $PATH'):$PATH

node index.js "$1"

Just want to ensure I don't break it again.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFj6xxq2X8AHzdA5D2O587qUNVIs_ONks5qPvDYgaJpZM4I-okB
.

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

👍👌😃😄😀👏😎😊😁

from alfred-emoj.

CWSpear avatar CWSpear commented on May 20, 2024

@sindresorhus does it solve anything by using something like enclose.js? to package your module as a binary? I was able to package the script from this repo. It was about 15 MB. Could this be a workaround cuz then we wouldn't need to know PATH? And since you're only targeting Macs, it's okay if it's only compiled for Macs.

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

@CWSpear Last resort maybe, but hope it doesn't get to that.

from alfred-emoj.

CWSpear avatar CWSpear commented on May 20, 2024

Why is that a last resort?

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

Because it's 15 MB, and while I don't mind that, people will complain and call it a waste of space. I also think I can fix it without, so at least gonna try. Packaging as a binary surely come with its own quirk and problems too.

from alfred-emoj.

sindresorhus avatar sindresorhus commented on May 20, 2024

But most importantly, users don't like installing random binaries and not seeing what kind of source they're running.

from alfred-emoj.

CWSpear avatar CWSpear commented on May 20, 2024

The source is on GitHub, and people are welcome to download and build themselves (or at least if you trust the developer, just check the checksum). I think it's a valid concern, but I don't know if it's really something that is your responsibility.

I mean, there are lots of tools/languages/other places that package binaries and stuff (having dabbled in Go, that's all you do!). I can't speak for everyone, but I think the advantages of "just works" and not having to deal with "works in my environment but not yours" greatly outweighs that.

Anyway, it's your project, and I know you deal with a ton of projects and issues. I just wanted to offer the suggestion hoping it might help. I definitely won't be offended if you don't take the suggestion =)

Thanks for all your awesome work in the Node et al community!

from alfred-emoj.

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.