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

executable file not found in $PATH error for an alias I have #38

Open
nikitavoloboev opened this issue Mar 2, 2017 · 4 comments
Open

Comments

@nikitavoloboev
Copy link

I have an alias that I want to run when a file changes so I enter this command :

reflex -g '*.go' afl where afl is an alias that runs a command. I get an error. that executable file is not found in $PATH even though the alias is in the path.

@nikitavoloboev
Copy link
Author

Just checked and if I actually run the commands that this is alias is for, it works. I would still prefer to use an alias if possible. Not sure why it doesn't work.

@cespare
Copy link
Owner

cespare commented Mar 2, 2017

Do you mean a bash/other shell alias? Reflex is just execing a program; it cannot evaluate a shell alias.

(I'm not even sure how this could work.)

@nikitavoloboev
Copy link
Author

Yeah, zsh alias actually. I was not aware that you can't exec aliases. I guess I will write out the full name of the command instead of the alias. Alias just saves typing for me.

@pre
Copy link

pre commented Dec 17, 2020

Same idea, different use case: support having an environment variable in reflex.conf.

So that you could share the same config and change the actual runnable application using an environment variable.

For example:

# Run "yarn install" when package.json changes
--start-service=false \
  --shutdown-timeout=3s \
  -r '^package.json' \
  -- \
    yarn install

# Restart server when code changes
--start-service=true \
  --shutdown-timeout=3s \
  -r '\.js$' \
  -R '^node_modules/' \
  -- \
    $APP_CMD

At the moment this will fail since $APP_CMD is not interpolated. Reflex could still use exec internally, if it just interpolated the environment variable first.

FWIW, current error message is [01] exec: "$APP_CMD": executable file not found in $PATH since it tries to exec for the literal variable name.

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

No branches or pull requests

3 participants