Comments (3)
@Corey-Lylyk Each command that ahoy
runs is run inside a separate bash -c "<your-command-here>"
subroutine, so if you run your source
command outside that, it will not pick up the same environment variables when inside the bash
subroutine.
I'm not sure I'm explaining this very clearly (and I'm not the original author of ahoy
so I don't have complete domain knowledge), but I think you should be able to achieve what you want by making your my_release_script.sh
have a shebang line (that is, start with #!/bin/bash
) and be executable, and then running something like:
ahoyapi: v2
commands:
release:
cmd: |
source venv/bin/activate &&
./my_release_script.sh
usage: Runs my_release_script.
Notice that the command is now broken over multiple lines for ease of reading. In the first line the Python virtualenv
is activated, then the Bash logical operator (&&
) is used to make sure your release script command on the next line is only run if the virtualenv
activation ran successfully.
from ahoy.
@Corey-Lylyk Hmm, can you give me a bit more information about what you're trying to run?
E.g. are you running this source
command as part of a string of other commands, where you want the virtualenv
to be active for those other commands?
from ahoy.
Yeah originally I'm using the command
source ./my_release_script.sh
and I would like to use something like
ahoy release
the ahoy file would have:
ahoyapi: v2
commands:
release:
cmd: source my_release_script.sh
usage: Runs my_release_script.
I need the script to run in the ahoy command terminal
from ahoy.
Related Issues (20)
- End of command options -- is not respected in 2.0.1 HOT 5
- chore: CVEs in used go libraries HOT 3
- Command aliases HOT 2
- Submit ahoy to homebrew-core HOT 1
- Passing arguments/flags? HOT 4
- Update to CircleCI 2 HOT 1
- Global .ahoy.yml HOT 6
- Influence imports HOT 4
- First image in README.md is broken HOT 1
- zsh: segmentation fault | on MacBook Pro 13 with Apple M1 chip HOT 2
- request a new release HOT 6
- ahoy -f get "[fatal] Missing flag or argument." HOT 1
- Does not Support new Apple M1 Processor, linux/arm64/v8 HOT 1
- Offering help with project maintenance HOT 2
- Delegating Maintenance to Contributors HOT 8
- Get Automated tests working again HOT 8
- Push an updated version of docs to readthedocs HOT 4
- Cannot properly trap SIGINT HOT 2
- How to publish updated documentation? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahoy.